diff options
-rw-r--r-- | webkit/glue/webview_impl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 1220f7a..ea18c4a 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -906,10 +906,6 @@ bool WebViewImpl::ShouldClose() { } void WebViewImpl::Close() { - // Do this first to prevent reentrant notifications from being sent to the - // initiator of the close. - delegate_ = NULL; - if (page_.get()) { // Initiate shutdown for the entire frameset. This will cause a lot of // notifications to be sent. @@ -922,6 +918,10 @@ void WebViewImpl::Close() { if (devtools_agent_.get()) devtools_agent_.reset(NULL); + // Reset the delegate to prevent notifications being sent as we're being + // deleted. + delegate_ = NULL; + Release(); // Balances AddRef from WebView::Create } |