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; |
} |
} |