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

Unified Diff: Source/core/workers/WorkerGlobalScope.cpp

Issue 22467005: Correctly attribute exceptions thrown inside a Worker's imported scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Killing windows-specific expectations. Created 7 years, 4 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 | « Source/bindings/v8/WorkerScriptController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerGlobalScope.cpp
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp
index 263c9ec6874424fbc91bc06f25e66f22c844e91a..f80e1ffce1fbce92a2df89978d9e09dd0faf7832 100644
--- a/Source/core/workers/WorkerGlobalScope.cpp
+++ b/Source/core/workers/WorkerGlobalScope.cpp
@@ -214,10 +214,10 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState
InspectorInstrumentation::scriptImported(scriptExecutionContext(), scriptLoader->identifier(), scriptLoader->script());
- ScriptValue exception;
- m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader->responseURL()), &exception);
- if (!exception.hasNoValue()) {
- m_script->setException(exception);
+ RefPtr<ErrorEvent> errorEvent;
+ m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader->responseURL()), &errorEvent);
+ if (errorEvent) {
+ m_script->rethrowExceptionFromImportedScript(errorEvent.release());
return;
}
}
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698