[webview_flutter_wkwebview] Prevents test WKFrameInfo from deallocating during tests to prevent crash#11415
[webview_flutter_wkwebview] Prevents test WKFrameInfo from deallocating during tests to prevent crash#11415bparrishMines wants to merge 3 commits intoflutter:mainfrom
WKFrameInfo from deallocating during tests to prevent crash#11415Conversation
WKFrameInfo from deallocating during tests to prevent crash
There was a problem hiding this comment.
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.
packages/webview_flutter/webview_flutter_wkwebview/darwin/Tests/FrameInfoProxyAPITests.swift
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_wkwebview/darwin/Tests/FrameInfoProxyAPITests.swift
Show resolved
Hide resolved
|
@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. |
|
@bparrishMines Thanks for taking a look! I was able to test these changes on CI PR #10635 and can confirm they resolve the crash. However a separate integration test failure appeared in Since the fix is just a small adjustment (checking the URL only if it's non-null), I thought it might be worth including here Would you be open to including that fix in this PR, or would you prefer I keep it separate? wdyt? |
Fixes flutter/flutter#182846
Pre-Review Checklist
[shared_preferences]///).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-assistbot 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
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