Commit 5a0317c2 authored by aroben@apple.com's avatar aroben@apple.com

Make the Inspector able to handle being reloaded

        When Reload was selected from the context menu in the Inspector, the
        Inspector window would close and never be openable again. Now it
        closes, then reopens when the page finishes loading.

        Reviewed by Tim Hatcher.

        * page/InspectorController.cpp:
        (WebCore::InspectorController::close): Removed code that cleared out
        m_page. This is now handled by pageDestroyed.
        * page/InspectorController.h:
        (WebCore::InspectorController::inspectedPageDestroyed): Added.
        * page/Page.cpp:
        (WebCore::Page::~Page): Fixed a bug and added a call to the new
        inspectedPageDestroyed. If we have a parent InspectorController, that
        means that we are the Page in the Inspector's window (i.e., we are the
        Inspector's UI), so when we are destroyed we should call
        InspectorController::pageDestroyed. We also need to call
        inspectedPageDestroyed on our own InspectorController so that it won't
        try to call into us.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 47633d0b
2008-05-14 Adam Roben <aroben@apple.com>
Make the Inspector able to handle being reloaded
When Reload was selected from the context menu in the Inspector, the
Inspector window would close and never be openable again. Now it
closes, then reopens when the page finishes loading.
Reviewed by Tim Hatcher.
* page/InspectorController.cpp:
(WebCore::InspectorController::close): Removed code that cleared out
m_page. This is now handled by pageDestroyed.
* page/InspectorController.h:
(WebCore::InspectorController::inspectedPageDestroyed): Added.
* page/Page.cpp:
(WebCore::Page::~Page): Fixed a bug and added a call to the new
inspectedPageDestroyed. If we have a parent InspectorController, that
means that we are the Page in the Inspector's window (i.e., we are the
Inspector's UI), so when we are destroyed we should call
InspectorController::pageDestroyed. We also need to call
inspectedPageDestroyed on our own InspectorController so that it won't
try to call into us.
2008-05-14 Timothy Hatcher <timothy@apple.com>
Add pause on exception support to the Inspector debugger
......@@ -1304,13 +1304,10 @@ void InspectorController::close()
return;
closeWindow();
if (m_page)
m_page->setParentInspectorController(0);
ASSERT(m_scriptContext && m_scriptObject);
JSValueUnprotect(m_scriptContext, m_scriptObject);
m_page = 0;
m_scriptObject = 0;
m_scriptContext = 0;
}
......
......@@ -74,6 +74,7 @@ public:
InspectorController(Page*, InspectorClient*);
~InspectorController();
void inspectedPageDestroyed() { m_inspectedPage = 0; }
void pageDestroyed() { m_page = 0; }
bool enabled() const;
......
......@@ -123,7 +123,9 @@ Page::~Page()
for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
frame->pageDestroyed();
m_editorClient->pageDestroyed();
m_inspectorController->pageDestroyed();
if (m_parentInspectorController)
m_parentInspectorController->pageDestroyed();
m_inspectorController->inspectedPageDestroyed();
m_backForwardList->close();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment