Index: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
index 7873baa84f5fa79559588832ba2b4724f0cb9112..2a4236d0e2a498a195768475c353f4501554998f 100644 |
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
@@ -108,6 +108,11 @@ WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl() |
// Detach the client before closing the view to avoid getting called back. |
m_mainFrame->setClient(0); |
+ if (m_workerGlobalScopeProxy) { |
+ m_workerGlobalScopeProxy->detach(); |
+ m_workerGlobalScopeProxy.clear(); |
+ } |
+ |
m_webView->close(); |
m_mainFrame->close(); |
if (m_loaderProxy) |