Index: Source/core/inspector/InspectorClient.cpp |
diff --git a/Source/core/inspector/InspectorClient.cpp b/Source/core/inspector/InspectorClient.cpp |
index 58a2cdb9d691e3867d524412335cc06a9fb22ed6..bc0bcd7ef00a0d96f8dcd5653c4d919110c405be 100644 |
--- a/Source/core/inspector/InspectorClient.cpp |
+++ b/Source/core/inspector/InspectorClient.cpp |
@@ -47,10 +47,7 @@ bool InspectorClient::doDispatchMessageOnFrontendPage(Page* frontendPage, const |
if (!frame) |
return false; |
- ScriptController* scriptController = frame->script(); |
- if (!scriptController) |
- return false; |
- scriptController->executeScriptInMainWorld("InspectorFrontendAPI.dispatchMessageAsync(" + message + ");", ScriptController::ExecuteScriptWhenScriptsDisabled); |
+ frame->script().executeScriptInMainWorld("InspectorFrontendAPI.dispatchMessageAsync(" + message + ");", ScriptController::ExecuteScriptWhenScriptsDisabled); |
return true; |
} |