diff options
Diffstat (limited to 'WebCore/inspector/InjectedScriptHost.cpp')
-rw-r--r-- | WebCore/inspector/InjectedScriptHost.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/WebCore/inspector/InjectedScriptHost.cpp b/WebCore/inspector/InjectedScriptHost.cpp index 37512be..06b25fe 100644 --- a/WebCore/inspector/InjectedScriptHost.cpp +++ b/WebCore/inspector/InjectedScriptHost.cpp @@ -42,9 +42,9 @@ #include "InspectorClient.h" #include "InspectorController.h" #include "InspectorDOMAgent.h" +#include "InspectorFrontend.h" #include "InspectorResource.h" #include "Pasteboard.h" -#include "RemoteInspectorFrontend.h" #if ENABLE(JAVASCRIPT_DEBUGGER) #include "ScriptDebugServer.h" @@ -98,15 +98,14 @@ Node* InjectedScriptHost::nodeForId(long nodeId) long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI) { - RemoteInspectorFrontend* frontend = remoteFrontend(); InspectorDOMAgent* domAgent = inspectorDOMAgent(); - if (!domAgent || !frontend) + if (!domAgent || !frontend()) return 0; long id = domAgent->pushNodePathToFrontend(node); if (withChildren) domAgent->pushChildNodesToFrontend(id); if (selectInUI) - frontend->updateFocusedNode(id); + frontend()->updateFocusedNode(id); return id; } @@ -149,6 +148,9 @@ InjectedScript InjectedScriptHost::injectedScriptForId(long id) void InjectedScriptHost::discardInjectedScripts() { + IdToInjectedScriptMap::iterator end = m_idToInjectedScript.end(); + for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it != end; ++it) + discardInjectedScript(it->second.scriptState()); m_idToInjectedScript.clear(); } @@ -172,11 +174,11 @@ InspectorDOMAgent* InjectedScriptHost::inspectorDOMAgent() return m_inspectorController->domAgent(); } -RemoteInspectorFrontend* InjectedScriptHost::remoteFrontend() +InspectorFrontend* InjectedScriptHost::frontend() { if (!m_inspectorController) return 0; - return m_inspectorController->m_remoteFrontend.get(); + return m_inspectorController->m_frontend.get(); } pair<long, ScriptObject> InjectedScriptHost::injectScript(const String& source, ScriptState* scriptState) |