Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: Source/bindings/core/v8/WorkerScriptController.cpp

Issue 930213002: Report V8 execution termination in a worker as an error. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: sync Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698