Index: content/shell/browser/shell_devtools_frontend.cc |
diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc |
index 2f417ac3a36d8ab4b8032232f5d563aba12ea563..fe30eddef0c8e94ebb52eb416e94017c8683a661 100644 |
--- a/content/shell/browser/shell_devtools_frontend.cc |
+++ b/content/shell/browser/shell_devtools_frontend.cc |
@@ -143,9 +143,8 @@ |
void ShellDevToolsFrontend::DispatchOnInspectorFrontend( |
const std::string& message) { |
- std::string code = "InspectorFrontendAPI.dispatchMessage(" + message + ");"; |
- base::string16 javascript = base::UTF8ToUTF16(code); |
- web_contents()->GetMainFrame()->ExecuteJavaScript(javascript); |
+ if (frontend_host_) |
+ frontend_host_->DispatchOnDevToolsFrontend(message); |
} |
void ShellDevToolsFrontend::InspectedContentsClosing() { |