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

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

Issue 607513002: Onerror return value handling in workers fixed as per HTML5 spec. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added new layout tests and rebaselined two of them. Created 6 years, 2 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
Index: Source/core/workers/WorkerMessagingProxy.cpp
diff --git a/Source/core/workers/WorkerMessagingProxy.cpp b/Source/core/workers/WorkerMessagingProxy.cpp
index 3fc69d9d5270a50a7cca958e0dfba16a2b9b9880..1c72d7511c3758ca4315b4eaf9d046b657f4e47f 100644
--- a/Source/core/workers/WorkerMessagingProxy.cpp
+++ b/Source/core/workers/WorkerMessagingProxy.cpp
@@ -174,7 +174,8 @@ void WorkerMessagingProxy::reportException(const String& errorMessage, int lineN
// This is intentionally different than the behavior in MessageWorkerTask, because terminated workers no longer deliver messages (section 4.6 of the WebWorker spec), but they do report exceptions.
RefPtrWillBeRawPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, lineNumber, columnNumber, 0);
- bool errorHandled = !m_workerObject->dispatchEvent(event);
+ // Pass it on the error if "false" is returned, if "true" don't.
+ bool errorHandled = m_workerObject->dispatchEvent(event);
if (!errorHandled)
m_executionContext->reportException(event, 0, nullptr, NotSharableCrossOrigin);
}

Powered by Google App Engine
This is Rietveld 408576698