2009-12-01 Yael Aharon <yael.aharon@nokia.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2009 17:24:08 +0000 (17:24 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2009 17:24:08 +0000 (17:24 +0000)
        Reviewed by Timothy Hatcher.

        Reloading WebInspector from context menu is closing it instead of reloading.
        https://bugs.webkit.org/show_bug.cgi?id=32004

        When reloading WebInspector, don't delete its m_page.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::close):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51544 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/inspector/InspectorController.cpp

index c0456f202aa8822072fe96ece46889aa87b5c3f2..0afcc932d8a2816344f054b15508989a188b2dcb 100644 (file)
@@ -1,3 +1,15 @@
+2009-12-01  Yael Aharon  <yael.aharon@nokia.com>
+
+        Reviewed by Timothy Hatcher.
+
+        Reloading WebInspector from context menu is closing it instead of reloading.
+        https://bugs.webkit.org/show_bug.cgi?id=32004
+
+        When reloading WebInspector, don't delete its m_page.
+
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::close):
+
 2009-12-01  Steve Block  <steveblock@google.com>
 
         Reviewed by Dimitri Glazkov.
index 4e465e9e967aba3d78113732566db9ec3696c31f..a88a29993bc188c5531912c819da3c472a36f87b 100644 (file)
@@ -630,9 +630,12 @@ void InspectorController::close()
     releaseDOMAgent();
     m_timelineAgent = 0;
     m_scriptState = 0;
-    if (m_page)
-        m_page->setParentInspectorController(0);
-    m_page = 0;
+    if (m_page) {
+        if (!m_page->mainFrame() || !m_page->mainFrame()->loader() || !m_page->mainFrame()->loader()->isLoading()) {
+            m_page->setParentInspectorController(0);
+            m_page = 0;
+        }
+    }
 }
 
 void InspectorController::showWindow()