Skip to content

[webview_flutter_wkwebview] Prevents test WKFrameInfo from deallocating during tests to prevent crash#11415

Open
bparrishMines wants to merge 3 commits intoflutter:mainfrom
bparrishMines:wkwebview_frame
Open

[webview_flutter_wkwebview] Prevents test WKFrameInfo from deallocating during tests to prevent crash#11415
bparrishMines wants to merge 3 commits intoflutter:mainfrom
bparrishMines:wkwebview_frame

Conversation

@bparrishMines
Copy link
Copy Markdown
Contributor

@bparrishMines bparrishMines commented Apr 1, 2026

Fixes flutter/flutter#182846

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@bparrishMines bparrishMines changed the title Wkwebview frame [webview_flutter_wkwebview] Prevents test WKFrameInfo from deallocating during tests to prevent crash Apr 1, 2026
@bparrishMines bparrishMines added the CICD Run CI/CD label Apr 1, 2026
@bparrishMines bparrishMines marked this pull request as ready for review April 1, 2026 21:07
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors unit tests in the WKWebView package to use static instances of TestFrameInfo and TestFrameInfoWithNilRequest to prevent crashes during deallocation on newer iOS versions. The review feedback identifies a recurring typo in the code comments where 'iOS 26+' is cited instead of the correct iOS version.

@bparrishMines
Copy link
Copy Markdown
Contributor Author

@okorohelijah @vashworth I believe this fixes flutter/flutter#182846, so feel free to try or use this when upgrading CI to iOS 26. The tests pass when I run it locally on iOS 26 with Xcode 26.4 with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[webview_flutter_wkwebview] native tests crashing/restarting on ios 26

1 participant