-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[android_webview_controller] Fixes bug where an AndroidController
couldn't be reused
#6910
Conversation
AndroidController
couldn't be reused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like anything else is calling destroy()
; won't this leak the WebView
internals?
Hmmm, I was actually curious as to how important it was to call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! (I agree the docs aren't very helpful about this method; it sounds to me like calling it is necessary, but it's not actually that clear, nor does it explain why.)
…troller` couldn't be reused (flutter/plugins#6910)
…troller` couldn't be reused (flutter/plugins#6910)
…troller` couldn't be reused (flutter/plugins#6910)
* d607cd910 Roll Flutter from 0d91c03 to 2201698 (28 revisions) (flutter/plugins#6953) * e2d174ca1 [tool] Check for search paths in Swift plugins (flutter/plugins#6954) * f80aabf03 [shared_preferences] Revert recent iOS example changes (flutter/plugins#6955) * f36fa6407 [android_webview_controller] Fixes bug where an `AndroidController` couldn't be reused (flutter/plugins#6910) * b751ff166 [webview_flutter_android] Fixes crash when the Java `InstanceManager` was used after plugin was removed from engine (flutter/plugins#6943) * 1efd51837 Roll Flutter from 2201698 to 68dd63d (9 revisions) (flutter/plugins#6956) * eda98cddb Roll Flutter from 68dd63d to 1220245 (4 revisions) (flutter/plugins#6957) * 4e5cf2d2d Roll Flutter from 1220245 to 8c2fdb8 (2 revisions) (flutter/plugins#6979)
…#118624) * d607cd910 Roll Flutter from 0d91c03 to 2201698 (28 revisions) (flutter/plugins#6953) * e2d174ca1 [tool] Check for search paths in Swift plugins (flutter/plugins#6954) * f80aabf03 [shared_preferences] Revert recent iOS example changes (flutter/plugins#6955) * f36fa6407 [android_webview_controller] Fixes bug where an `AndroidController` couldn't be reused (flutter/plugins#6910) * b751ff166 [webview_flutter_android] Fixes crash when the Java `InstanceManager` was used after plugin was removed from engine (flutter/plugins#6943) * 1efd51837 Roll Flutter from 2201698 to 68dd63d (9 revisions) (flutter/plugins#6956) * eda98cddb Roll Flutter from 68dd63d to 1220245 (4 revisions) (flutter/plugins#6957) * 4e5cf2d2d Roll Flutter from 1220245 to 8c2fdb8 (2 revisions) (flutter/plugins#6979)
…ouldn't be reused (flutter#6910) * the fix * change location of setting pageLoaded * destroy webview when removed from system
Bug is fixed by not calling
destroy()
when the widget is disposed.This shouldn't cause a regression since we were calling it incorrectly in 4.0 and pre 4.0 anyways. We could consider offering a
AndroidWebViewController.destoryWebView()
if the community shows interest in using this method.Fixes the issue flutter/flutter#117887 for WebView
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.