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

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

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Fix typo Created 4 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
Index: third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
index 039a4f3aadfad6eef5c52801ea19a94ce69b3617..ac3dd3c284ac78d8dbc12238e9bb2a91083e170c 100644
--- a/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
@@ -55,10 +55,10 @@ namespace blink {
namespace {
-void processExceptionOnWorkerGlobalScope(int exceptionId, bool isHandled, ExecutionContext* scriptContext)
+void processExceptionOnWorkerGlobalScope(int exceptionId, bool handled, ExecutionContext* scriptContext)
{
WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext);
- globalScope->exceptionHandled(exceptionId, isHandled);
+ globalScope->exceptionHandled(exceptionId, handled);
}
void processMessageOnWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message, PassOwnPtr<MessagePortChannelArray> channels, WorkerObjectProxy* workerObjectProxy, ExecutionContext* scriptContext)
@@ -171,8 +171,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, nullptr);
- bool errorHandled = !m_workerObject->dispatchEvent(event);
- postTaskToWorkerGlobalScope(createCrossThreadTask(&processExceptionOnWorkerGlobalScope, exceptionId, errorHandled));
+ DispatchEventResult dispatchResult = m_workerObject->dispatchEvent(event);
+ postTaskToWorkerGlobalScope(createCrossThreadTask(&processExceptionOnWorkerGlobalScope, exceptionId, dispatchResult != DispatchEventResult::NotCanceled));
}
void WorkerMessagingProxy::reportConsoleMessage(MessageSource source, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)

Powered by Google App Engine
This is Rietveld 408576698