Index: Source/bindings/core/v8/WorkerScriptController.cpp |
diff --git a/Source/bindings/core/v8/WorkerScriptController.cpp b/Source/bindings/core/v8/WorkerScriptController.cpp |
index 4526752fa6332be7c8890e2fdfe24ef0f8e49371..249c4b3363b3413d401dd9c1efab21e54ec8ceba 100644 |
--- a/Source/bindings/core/v8/WorkerScriptController.cpp |
+++ b/Source/bindings/core/v8/WorkerScriptController.cpp |
@@ -216,7 +216,7 @@ ScriptValue WorkerScriptController::evaluate(const String& script, const String& |
v8::Local<v8::Value> result = V8ScriptRunner::runCompiledScript(m_isolate, compiledScript, &m_workerGlobalScope); |
if (!block.CanContinue()) { |
- m_workerGlobalScope.script()->forbidExecution(); |
+ forbidExecution(); |
return ScriptValue(); |
} |
@@ -247,6 +247,8 @@ bool WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode, RefPtr |
WorkerGlobalScopeExecutionState state(this); |
evaluate(sourceCode.source(), sourceCode.url().string(), sourceCode.startPosition(), cacheHandler, v8CacheOptions); |
+ if (isExecutionForbidden()) |
+ return false; |
if (state.hadException) { |
if (errorEvent) { |
if (state.m_errorEventFromImportedScript) { |