X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..HEAD:/inspector/agents/JSGlobalObjectRuntimeAgent.cpp diff --git a/inspector/agents/JSGlobalObjectRuntimeAgent.cpp b/inspector/agents/JSGlobalObjectRuntimeAgent.cpp index 126189e..46049f5 100644 --- a/inspector/agents/JSGlobalObjectRuntimeAgent.cpp +++ b/inspector/agents/JSGlobalObjectRuntimeAgent.cpp @@ -26,8 +26,6 @@ #include "config.h" #include "JSGlobalObjectRuntimeAgent.h" -#if ENABLE(INSPECTOR) - #include "InjectedScript.h" #include "InjectedScriptManager.h" #include "JSGlobalObject.h" @@ -42,16 +40,18 @@ JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent(InjectedScriptManager* in { } -void JSGlobalObjectRuntimeAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher) +void JSGlobalObjectRuntimeAgent::didCreateFrontendAndBackend(FrontendChannel* frontendChannel, BackendDispatcher* backendDispatcher) { - m_frontendDispatcher = std::make_unique(frontendChannel); - m_backendDispatcher = InspectorRuntimeBackendDispatcher::create(backendDispatcher, this); + m_frontendDispatcher = std::make_unique(frontendChannel); + m_backendDispatcher = RuntimeBackendDispatcher::create(backendDispatcher, this); } -void JSGlobalObjectRuntimeAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason) +void JSGlobalObjectRuntimeAgent::willDestroyFrontendAndBackend(DisconnectReason reason) { m_frontendDispatcher = nullptr; - m_backendDispatcher.clear(); + m_backendDispatcher = nullptr; + + InspectorRuntimeAgent::willDestroyFrontendAndBackend(reason); } VM& JSGlobalObjectRuntimeAgent::globalVM() @@ -59,18 +59,16 @@ VM& JSGlobalObjectRuntimeAgent::globalVM() return m_globalObject.vm(); } -InjectedScript JSGlobalObjectRuntimeAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId) +InjectedScript JSGlobalObjectRuntimeAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) { ASSERT_UNUSED(executionContextId, !executionContextId); JSC::ExecState* scriptState = m_globalObject.globalExec(); InjectedScript injectedScript = injectedScriptManager()->injectedScriptFor(scriptState); if (injectedScript.hasNoValue()) - *errorString = ASCIILiteral("Internal error: main world execution context not found."); + errorString = ASCIILiteral("Internal error: main world execution context not found."); return injectedScript; } } // namespace Inspector - -#endif // ENABLE(INSPECTOR)