diff options
Diffstat (limited to 'Source/WebCore/inspector/InspectorClient.cpp')
-rw-r--r-- | Source/WebCore/inspector/InspectorClient.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Source/WebCore/inspector/InspectorClient.cpp b/Source/WebCore/inspector/InspectorClient.cpp index c33e6ac01..21ee2b3d0 100644 --- a/Source/WebCore/inspector/InspectorClient.cpp +++ b/Source/WebCore/inspector/InspectorClient.cpp @@ -29,33 +29,28 @@ */ #include "config.h" - -#if ENABLE(INSPECTOR) - #include "InspectorClient.h" +#include "InspectorController.h" #include "MainFrame.h" #include "Page.h" #include "ScriptController.h" #include "ScriptSourceCode.h" -#include <bindings/ScriptValue.h> +#include <interpreter/FrameTracers.h> +using namespace JSC; using namespace Inspector; namespace WebCore { -bool InspectorClient::doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message) +void InspectorClient::doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message) { if (!frontendPage) - return false; + return; - String dispatchToFrontend = "InspectorFrontendAPI.dispatchMessageAsync(" + message + ");"; - - // FIXME: This should execute the script in the appropriate world. + SuspendExceptionScope scope(&frontendPage->inspectorController().vm()); + String dispatchToFrontend = makeString("InspectorFrontendAPI.dispatchMessageAsync(", message, ");"); frontendPage->mainFrame().script().evaluate(ScriptSourceCode(dispatchToFrontend)); - return true; } } // namespace WebCore - -#endif // ENABLE(INSPECTOR) |