summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webdevtoolsagent_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/webdevtoolsagent_impl.cc')
-rw-r--r--webkit/glue/webdevtoolsagent_impl.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/webkit/glue/webdevtoolsagent_impl.cc b/webkit/glue/webdevtoolsagent_impl.cc
index 8902227..a96143a 100644
--- a/webkit/glue/webdevtoolsagent_impl.cc
+++ b/webkit/glue/webdevtoolsagent_impl.cc
@@ -169,7 +169,8 @@ void WebDevToolsAgentImpl::DispatchOnInspectorController(
String result;
String exception;
result = debugger_agent_impl_->ExecuteUtilityFunction(utility_context_,
- "InspectorControllerDispatcher", function_name, json_args, &exception);
+ call_id, "InspectorControllerDispatcher", function_name, json_args,
+ false /* is sync */, &exception);
tools_agent_delegate_stub_->DidDispatchOn(call_id,
result, exception);
}
@@ -180,10 +181,17 @@ void WebDevToolsAgentImpl::DispatchOnInjectedScript(
const String& json_args) {
String result;
String exception;
+ String fname = function_name;
+ bool async = function_name.endsWith("_async");
+ if (async) {
+ fname = fname.substring(0, fname.length() - 6);
+ }
result = debugger_agent_impl_->ExecuteUtilityFunction(utility_context_,
- "InjectedScript", function_name, json_args, &exception);
- tools_agent_delegate_stub_->DidDispatchOn(call_id,
- result, exception);
+ call_id, "InjectedScript", fname, json_args, async, &exception);
+ if (!async) {
+ tools_agent_delegate_stub_->DidDispatchOn(call_id,
+ result, exception);
+ }
}
void WebDevToolsAgentImpl::ExecuteVoidJavaScript() {