Index: webkit/glue/webview_impl.cc |
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc |
index e40d27bd6f574827d7c5691bb37caa58ddbe6cec..926512973699056c8efef3c4f3b44dff384ae511 100644 |
--- a/webkit/glue/webview_impl.cc |
+++ b/webkit/glue/webview_impl.cc |
@@ -907,10 +907,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. |
@@ -923,6 +919,10 @@ void WebViewImpl::Close() { |
if (devtools_agent_.get()) |
devtools_agent_.reset(NULL); |
+ // Do this first to prevent reentrant notifications from being sent to the |
+ // initiator of the close. |
+ delegate_ = NULL; |
+ |
Release(); // Balances AddRef from WebView::Create |
} |