diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/inspector/InspectorClient.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
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) |