summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/InspectorBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/InspectorBackend.cpp')
-rw-r--r--WebCore/inspector/InspectorBackend.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 999a4b7..1ce0e69 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -40,6 +40,7 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "HTMLFrameOwnerElement.h"
+#include "InjectedScript.h"
#include "InjectedScriptHost.h"
#include "InspectorClient.h"
#include "InspectorController.h"
@@ -54,7 +55,7 @@
#include "Storage.h"
#endif
-#if ENABLE(JAVASCRIPT_DEBUGGER)
+#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
#include "JavaScriptCallFrame.h"
#include "JavaScriptDebugServer.h"
using namespace JSC;
@@ -147,7 +148,7 @@ void InspectorBackend::stopTimelineProfiler()
m_inspectorController->stopTimelineProfiler();
}
-#if ENABLE(JAVASCRIPT_DEBUGGER)
+#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
bool InspectorBackend::debuggerEnabled() const
{
if (m_inspectorController)
@@ -285,7 +286,7 @@ void InspectorBackend::dispatchOnInjectedScript(long callId, long injectedScript
// FIXME: explicitly pass injectedScriptId along with node id to the frontend.
bool injectedScriptIdIsNodeId = injectedScriptId <= 0;
- ScriptObject injectedScript;
+ InjectedScript injectedScript;
if (injectedScriptIdIsNodeId)
injectedScript = m_inspectorController->injectedScriptForNodeId(-injectedScriptId);
else
@@ -294,19 +295,12 @@ void InspectorBackend::dispatchOnInjectedScript(long callId, long injectedScript
if (injectedScript.hasNoValue())
return;
- ScriptFunctionCall function(injectedScript.scriptState(), injectedScript, "dispatch");
- function.appendArgument(methodName);
- function.appendArgument(arguments);
- if (async)
- function.appendArgument(callId);
+ String result;
bool hadException = false;
- ScriptValue result = function.call(hadException);
+ injectedScript.dispatch(callId, methodName, arguments, async, &result, &hadException);
if (async)
return; // InjectedScript will return result asynchronously by means of ::reportDidDispatchOnInjectedScript.
- if (hadException)
- frontend->didDispatchOnInjectedScript(callId, "", true);
- else
- frontend->didDispatchOnInjectedScript(callId, result.toString(injectedScript.scriptState()), false);
+ frontend->didDispatchOnInjectedScript(callId, result, hadException);
}
void InspectorBackend::getChildNodes(long callId, long nodeId)