Commit 648d903b authored by danakj's avatar danakj Committed by Commit Bot

Null out the WebWidgetClient in WebViewImpl::Close().

We null away the WebViewClient already, but once the WebWidget parts
are closed we want to accept the RenderWidget (ie WebWidgetClient) being
destroyed. So drop the pointer to the WebWidgetClient when the main
frame is detached from Close().

R=dcheng@chromium.org

Bug: 912193
Change-Id: Ib4e0916c5e4cefaf49cb529135d38010809c3ea0
Reviewed-on: https://chromium-review.googlesource.com/c/1454135
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629602}
parent 2a27db26
......@@ -1289,14 +1289,11 @@ void WebViewImpl::Close() {
// means the main frame's WebWidget remains valid while the main frame is
// being detached (and in particular while its unload handlers run).
{
// TODO(danakj): We should close the widget client too not just the view
// client.
// AsWidget().client = nullptr;
AsWidget().client = nullptr;
if (does_composite_)
GetPage()->WillCloseLayerTreeView(*layer_tree_view_, nullptr);
SetRootLayer(nullptr);
animation_host_ = nullptr;
mutator_dispatcher_ = nullptr;
layer_tree_view_ = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment