[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

yurys at chromium.org yurys at chromium.org
Wed Dec 22 12:38:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1871a5d6f31cb881b04b67f5719f3c4aac0f1740
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 26 15:38:08 2010 +0000

    2010-08-26  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
            https://bugs.webkit.org/show_bug.cgi?id=44230
    
            * inspector/Inspector.idl:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::inspectedPageDestroyed):
            (WebCore::InspectorController::close):
            * inspector/InspectorFrontendClient.h:
            * inspector/InspectorFrontendHost.cpp:
            (WebCore::InspectorFrontendHost::disconnectFromBackend): don't try to notify InspectorController
            that frontend closes if InspectorController triggered the action.
            * inspector/InspectorFrontendHost.h:
            * inspector/InspectorFrontendHost.idl:
            * inspector/front-end/InspectorFrontendHostStub.js:
            (.WebInspector.InspectorFrontendHostStub.prototype.disconnectFromBackend):
            * inspector/front-end/inspector.js:
            (WebInspector.disconnectFromBackend):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66103 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1cfdd03..02ec189 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-08-26  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+        https://bugs.webkit.org/show_bug.cgi?id=44230
+
+        * inspector/Inspector.idl:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::inspectedPageDestroyed):
+        (WebCore::InspectorController::close):
+        * inspector/InspectorFrontendClient.h:
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::InspectorFrontendHost::disconnectFromBackend): don't try to notify InspectorController
+        that frontend closes if InspectorController triggered the action.
+        * inspector/InspectorFrontendHost.h:
+        * inspector/InspectorFrontendHost.idl:
+        * inspector/front-end/InspectorFrontendHostStub.js:
+        (.WebInspector.InspectorFrontendHostStub.prototype.disconnectFromBackend):
+        * inspector/front-end/inspector.js:
+        (WebInspector.disconnectFromBackend):
+
 2010-08-26  Ilya Tikhonovsky  <loislo at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 7f39f8d..e9b69f8 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -40,10 +40,9 @@ module core {
         [notify] void childNodeCountUpdated(out long id, out int newValue);
         [notify] void childNodeInserted(out long parentId, out long prevId, out Object node);
         [notify] void childNodeRemoved(out long parentId, out long id);
-        [notify] void close();
         [notify] void didCommitLoad();
         [notify] void evaluateForTestInFrontend(out long testCallId, out String script);
-        [notify] void inspectedPageDestroyed();
+        [notify] void disconnectFromBackend();
         [notify] void inspectedURLChanged(out String url);
         [notify] void monitoringXHRWasEnabled();
         [notify] void monitoringXHRWasDisabled();
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 7fb052c..b9c11c7 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -198,7 +198,7 @@ InspectorController::~InspectorController()
 void InspectorController::inspectedPageDestroyed()
 {
     if (m_frontend)
-        m_frontend->inspectedPageDestroyed();
+        m_frontend->disconnectFromBackend();
 
     hideHighlight();
 
@@ -537,7 +537,8 @@ void InspectorController::close()
 {
     if (!m_frontend)
         return;
-    m_frontend->close();
+    m_frontend->disconnectFromBackend();
+    disconnectFrontend();
 }
 
 void InspectorController::disconnectFrontend()
diff --git a/WebCore/inspector/InspectorFrontendClient.h b/WebCore/inspector/InspectorFrontendClient.h
index cbbbc53..31f52b7 100644
--- a/WebCore/inspector/InspectorFrontendClient.h
+++ b/WebCore/inspector/InspectorFrontendClient.h
@@ -53,6 +53,7 @@ public:
 
     virtual void bringToFront() = 0;
     virtual void closeWindow() = 0;
+    virtual void disconnectFromBackend() = 0;
 
     virtual void requestAttachWindow() = 0;
     virtual void requestDetachWindow() = 0;
diff --git a/WebCore/inspector/InspectorFrontendHost.cpp b/WebCore/inspector/InspectorFrontendHost.cpp
index 8dc00ae..bc529ea 100644
--- a/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/WebCore/inspector/InspectorFrontendHost.cpp
@@ -166,6 +166,14 @@ void InspectorFrontendHost::closeWindow()
     }
 }
 
+void InspectorFrontendHost::disconnectFromBackend()
+{
+    if (m_client) {
+        m_client->disconnectFromBackend();
+        disconnectClient(); // Disconnect from client.
+    }
+}
+
 void InspectorFrontendHost::bringToFront()
 {
     if (m_client)
diff --git a/WebCore/inspector/InspectorFrontendHost.h b/WebCore/inspector/InspectorFrontendHost.h
index 4b343fd..d333893 100644
--- a/WebCore/inspector/InspectorFrontendHost.h
+++ b/WebCore/inspector/InspectorFrontendHost.h
@@ -62,6 +62,7 @@ public:
     void requestAttachWindow();
     void requestDetachWindow();
     void closeWindow();
+    void disconnectFromBackend();
     void bringToFront();
     void inspectedURLChanged(const String&);
 
diff --git a/WebCore/inspector/InspectorFrontendHost.idl b/WebCore/inspector/InspectorFrontendHost.idl
index 0c7cf8b..6853c7d 100644
--- a/WebCore/inspector/InspectorFrontendHost.idl
+++ b/WebCore/inspector/InspectorFrontendHost.idl
@@ -34,6 +34,7 @@ module core {
     interface [Conditional=INSPECTOR] InspectorFrontendHost {
         void loaded();
         void closeWindow();
+        void disconnectFromBackend();
         void bringToFront();
         void inspectedURLChanged(in DOMString newURL);
 
diff --git a/WebCore/inspector/front-end/InspectorFrontendHostStub.js b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
index c4e6bf4..07f392d 100644
--- a/WebCore/inspector/front-end/InspectorFrontendHostStub.js
+++ b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
@@ -64,6 +64,11 @@ WebInspector.InspectorFrontendHostStub.prototype = {
         this._windowVisible = false;
     },
 
+    disconnectFromBackend: function()
+    {
+        this._windowVisible = false;
+    },
+
     attach: function()
     {
     },
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 2e2c54f..d1bdb30 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -713,9 +713,9 @@ WebInspector.close = function(event)
     InspectorFrontendHost.closeWindow();
 }
 
-WebInspector.inspectedPageDestroyed = function()
+WebInspector.disconnectFromBackend = function()
 {
-    WebInspector.close();
+    InspectorFrontendHost.disconnectFromBackend();
 }
 
 WebInspector.documentMouseOver = function(event)
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 9fb3c07..a8beac2 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-26  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+        https://bugs.webkit.org/show_bug.cgi?id=44230
+
+        * src/InspectorFrontendClientImpl.cpp:
+        (WebKit::InspectorFrontendClientImpl::disconnectFromBackend):
+        * src/InspectorFrontendClientImpl.h:
+
 2010-08-26  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index 46f2cb6..51864f1 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -105,6 +105,11 @@ void InspectorFrontendClientImpl::closeWindow()
     m_client->closeWindow();
 }
 
+void InspectorFrontendClientImpl::disconnectFromBackend()
+{
+    m_client->closeWindow();
+}
+
 void InspectorFrontendClientImpl::requestAttachWindow()
 {
     m_client->requestDockWindow();
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.h b/WebKit/chromium/src/InspectorFrontendClientImpl.h
index 1507bf2..fc21f3e 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.h
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.h
@@ -61,6 +61,7 @@ public:
 
     virtual void bringToFront();
     virtual void closeWindow();
+    virtual void disconnectFromBackend();
 
     virtual void requestAttachWindow();
     virtual void requestDetachWindow();
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 0ea5b81..eb98cb2 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-26  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+        https://bugs.webkit.org/show_bug.cgi?id=44230
+
+        * WebCoreSupport/InspectorClientGtk.cpp:
+        (WebKit::notifyWebViewDestroyed):
+        (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+        (WebKit::InspectorFrontendClient::closeWindow):
+        (WebKit::InspectorFrontendClient::disconnectFromBackend):
+        * WebCoreSupport/InspectorClientGtk.h:
+
 2010-08-26  Gustavo Noronha Silva  <gns at gnome.org>
 
         Reviewed by Martin Robinson.
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index aedf21f..c8b42d7 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -36,7 +36,7 @@ namespace WebKit {
 
 static void notifyWebViewDestroyed(WebKitWebView* webView, InspectorFrontendClient* inspectorFrontendClient)
 {
-    inspectorFrontendClient->destroyInspectorWindow();
+    inspectorFrontendClient->destroyInspectorWindow(true);
 }
 
 InspectorClient::InspectorClient(WebKitWebView* webView)
@@ -274,7 +274,7 @@ InspectorFrontendClient::~InspectorFrontendClient()
     ASSERT(!m_webInspector);
 }
 
-void InspectorFrontendClient::destroyInspectorWindow()
+void InspectorFrontendClient::destroyInspectorWindow(bool notifyInspectorController)
 {
     if (!m_webInspector)
         return;
@@ -284,7 +284,8 @@ void InspectorFrontendClient::destroyInspectorWindow()
     g_signal_handlers_disconnect_by_func(m_inspectorWebView, (gpointer)notifyWebViewDestroyed, (gpointer)this);
     m_inspectorWebView = 0;
 
-    core(m_inspectedWebView)->inspectorController()->disconnectFrontend();
+    if (notifyInspectorController)
+        core(m_inspectedWebView)->inspectorController()->disconnectFrontend();
 
     if (m_inspectorClient)
         m_inspectorClient->releaseFrontendPage();
@@ -326,7 +327,12 @@ void InspectorFrontendClient::bringToFront()
 
 void InspectorFrontendClient::closeWindow()
 {
-    destroyInspectorWindow();
+    destroyInspectorWindow(true);
+}
+
+void InspectorFrontendClient::disconnectFromBackend()
+{
+    destroyInspectorWindow(false);
 }
 
 void InspectorFrontendClient::attachWindow()
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
index 8b68405..08038f6 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
@@ -80,7 +80,7 @@ namespace WebKit {
 
         void disconnectInspectorClient() { m_inspectorClient = 0; }
 
-        void destroyInspectorWindow();
+        void destroyInspectorWindow(bool notifyInspectorController);
 
         virtual WTF::String localizedStringsURL();
 
@@ -88,6 +88,7 @@ namespace WebKit {
 
         virtual void bringToFront();
         virtual void closeWindow();
+        virtual void disconnectFromBackend();
 
         virtual void attachWindow();
         virtual void detachWindow();
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 565b1b0..d9be48c 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-26  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+        https://bugs.webkit.org/show_bug.cgi?id=44230
+
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorClient.mm:
+        (WebInspectorFrontendClient::closeWindow):
+        (WebInspectorFrontendClient::disconnectFromBackend):
+        (-[WebInspectorWindowController windowShouldClose:]):
+        (-[WebInspectorWindowController destroyInspectorView:]):
+
 2010-08-24  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
index d33e3b9..75a3cc6 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
@@ -84,6 +84,7 @@ public:
 
     virtual void bringToFront();
     virtual void closeWindow();
+    virtual void disconnectFromBackend();
 
     virtual void attachWindow();
     virtual void detachWindow();
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index 7cae8fc..d4d0213 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -66,7 +66,7 @@ using namespace WebCore;
 - (void)setFrontendClient:(WebInspectorFrontendClient*)frontendClient;
 - (void)setInspectorClient:(WebInspectorClient*)inspectorClient;
 - (void)setAttachedWindowHeight:(unsigned)height;
-- (void)destroyInspectorView;
+- (void)destroyInspectorView:(bool)notifyInspectorController;
 @end
 
 #pragma mark -
@@ -169,7 +169,12 @@ void WebInspectorFrontendClient::bringToFront()
 
 void WebInspectorFrontendClient::closeWindow()
 {
-    [m_windowController.get() destroyInspectorView];
+    [m_windowController.get() destroyInspectorView:true];
+}
+
+void WebInspectorFrontendClient::disconnectFromBackend()
+{
+    [m_windowController.get() destroyInspectorView:false];
 }
 
 void WebInspectorFrontendClient::attachWindow()
@@ -308,7 +313,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
 
 - (BOOL)windowShouldClose:(id)sender
 {
-    [self destroyInspectorView];
+    [self destroyInspectorView:true];
 
     return YES;
 }
@@ -439,7 +444,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
     [frameView setFrame:frameViewRect];
 }
 
-- (void)destroyInspectorView
+- (void)destroyInspectorView:(bool)notifyInspectorController
 {
     if (_destroyingInspectorView)
         return;
@@ -450,10 +455,12 @@ void WebInspectorFrontendClient::updateWindowTitle() const
 
     _visible = NO;
 
-    if (Page* inspectedPage = [_inspectedWebView page])
-        inspectedPage->inspectorController()->disconnectFrontend();
+    if (notifyInspectorController) {
+        if (Page* inspectedPage = [_inspectedWebView page])
+            inspectedPage->inspectorController()->disconnectFrontend();
 
-    _inspectorClient->releaseFrontendPage();
+        _inspectorClient->releaseFrontendPage();
+    }
 
     [_webView close];
 }
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 0a4fd3d..f2cd3b8 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-26  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+        https://bugs.webkit.org/show_bug.cgi?id=44230
+
+        * WebCoreSupport/InspectorClientQt.cpp:
+        (WebCore::InspectorFrontendClientQt::closeWindow):
+        (WebCore::InspectorFrontendClientQt::disconnectFromBackend):
+        (WebCore::InspectorFrontendClientQt::destroyInspectorView):
+        * WebCoreSupport/InspectorClientQt.h:
+
 2010-08-26  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index e13f6c3..6215523 100644
--- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -275,19 +275,12 @@ void InspectorFrontendClientQt::bringToFront()
 
 void InspectorFrontendClientQt::closeWindow()
 {
-    if (m_destroyingInspectorView)
-        return;
-    m_destroyingInspectorView = true;
-
-    // Clear reference from QWebInspector to the frontend view.
-    m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0);
-#if ENABLE(INSPECTOR)
-    m_inspectedWebPage->d->inspectorController()->disconnectFrontend();
-#endif
-    m_inspectorClient->releaseFrontendPage();
+    destroyInspectorView(true);
+}
 
-    // Clear pointer before deleting WebView to avoid recursive calls to its destructor.
-    OwnPtr<QWebView> inspectorView = m_inspectorView.release();
+void InspectorFrontendClientQt::disconnectFromBackend()
+{
+    destroyInspectorView(false);
 }
 
 void InspectorFrontendClientQt::attachWindow()
@@ -319,6 +312,24 @@ void InspectorFrontendClientQt::updateWindowTitle()
     }
 }
 
+void InspectorFrontendClientQt::destroyInspectorView(bool notifyInspectorController)
+{
+    if (m_destroyingInspectorView)
+        return;
+    m_destroyingInspectorView = true;
+
+    if (notifyInspectorController) {
+        // Clear reference from QWebInspector to the frontend view.
+        m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0);
+#if ENABLE(INSPECTOR)
+        m_inspectedWebPage->d->inspectorController()->disconnectFrontend();
+#endif
+        m_inspectorClient->releaseFrontendPage();
+    }
+
+    // Clear pointer before deleting WebView to avoid recursive calls to its destructor.
+    OwnPtr<QWebView> inspectorView = m_inspectorView.release();
+}
 }
 
 #include "InspectorClientQt.moc"
diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.h b/WebKit/qt/WebCoreSupport/InspectorClientQt.h
index 9526c88..48d8b08 100644
--- a/WebKit/qt/WebCoreSupport/InspectorClientQt.h
+++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.h
@@ -79,6 +79,7 @@ public:
 
     virtual void bringToFront();
     virtual void closeWindow();
+    virtual void disconnectFromBackend();
 
     virtual void attachWindow();
     virtual void detachWindow();
@@ -89,6 +90,7 @@ public:
 
 private:
     void updateWindowTitle();
+    void destroyInspectorView(bool notifyInspectorController);
     QWebPage* m_inspectedWebPage;
     OwnPtr<QWebView> m_inspectorView;
     QString m_inspectedURL;
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 9a20e51..81a01f5 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-26  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+        https://bugs.webkit.org/show_bug.cgi?id=44230
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+        (WebInspectorFrontendClient::closeWindow):
+        (WebInspectorFrontendClient::disconnectFromBackend):
+        (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+        (WebInspectorFrontendClient::destroyInspectorView):
+        * WebCoreSupport/WebInspectorClient.h:
+
 2010-08-24  Ada Chan  <adachan at apple.com>
 
         Reviewed by Steve Falkenburg.
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 34fb827..1b79dde 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -228,7 +228,7 @@ WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView
 
 WebInspectorFrontendClient::~WebInspectorFrontendClient()
 {
-    destroyInspectorView();
+    destroyInspectorView(true);
 }
 
 void WebInspectorFrontendClient::frontendLoaded()
@@ -260,7 +260,12 @@ void WebInspectorFrontendClient::bringToFront()
 
 void WebInspectorFrontendClient::closeWindow()
 {
-    destroyInspectorView();
+    destroyInspectorView(true);
+}
+
+void WebInspectorFrontendClient::disconnectFromBackend()
+{
+    destroyInspectorView(false);
 }
 
 void WebInspectorFrontendClient::attachWindow()
@@ -344,8 +349,6 @@ void WebInspectorFrontendClient::closeWindowWithoutNotifications()
     HWND hostWindow;
     if (SUCCEEDED(m_inspectedWebView->hostWindow((OLE_HANDLE*)&hostWindow)))
         SendMessage(hostWindow, WM_SIZE, 0, 0);
-
-    m_inspectorClient->updateHighlight();
 }
 
 void WebInspectorFrontendClient::showWindowWithoutNotifications()
@@ -397,16 +400,20 @@ void WebInspectorFrontendClient::showWindowWithoutNotifications()
     m_inspectorClient->updateHighlight();
 }
 
-void WebInspectorFrontendClient::destroyInspectorView()
+void WebInspectorFrontendClient::destroyInspectorView(bool notifyInspectorController)
 {
     if (m_destroyingInspectorView)
         return;
     m_destroyingInspectorView = true;
 
-    m_inspectedWebView->page()->inspectorController()->disconnectFrontend();
 
     closeWindowWithoutNotifications();
-    m_inspectorClient->frontendClosing();
+
+    if (notifyInspectorController) {
+        m_inspectedWebView->page()->inspectorController()->disconnectFrontend();
+        m_inspectorClient->updateHighlight();
+        m_inspectorClient->frontendClosing();
+    }
     ::DestroyWindow(m_frontendHwnd);
 }
 
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.h b/WebKit/win/WebCoreSupport/WebInspectorClient.h
index 4da3984..0c38247 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.h
@@ -93,6 +93,7 @@ public:
     
     virtual void bringToFront();
     virtual void closeWindow();
+    virtual void disconnectFromBackend();
     
     virtual void attachWindow();
     virtual void detachWindow();
@@ -106,7 +107,7 @@ private:
     void closeWindowWithoutNotifications();
     void showWindowWithoutNotifications();
 
-    void destroyInspectorView();
+    void destroyInspectorView(bool notifyInspectorController);
 
     void updateWindowTitle();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list