Close FindInPage Binding in WebLocalFrame::WillBeDetached
frame_ in FindInPage might be null when GetWebPluginForFind is called, causing a crash in crbug.com/875767. We've tried fixing it by making FindInPage a ContextLifecycleObserver but it seems like it's not working because we create FindInPage and immediately try to observe the context. But since FindInPage is constructed in WebLocalFrameImpl's constructor, before InitializeCoreFrame() has been called, there is no blink::LocalFrame, and we don't end up observing anything. This CL calls FindInPage::Dispose which closes the mojo binding when WebLocalFrame::WillBeDetached is called, which is called by LocalFrame::Detach. This CL also removes previous methods to close binding (the ContextLifeCycleObserver and Pre-finalizer) Bug: 875767 Change-Id: Idbce982da546f93733893c41f869f7eced2a7f4b Reviewed-on: https://chromium-review.googlesource.com/1182911 Commit-Queue: Rakina Zata Amni <rakina@chromium.org> Reviewed-by:Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#586639}
Showing
Please register or sign in to comment