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

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: Rebase Created 5 years 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 7aee2a7d2b3326a02550b52aee611506274b3fde..13a229dd9b6cec77d2234be54b8da458ff17d1f1 100644
--- a/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
@@ -56,10 +56,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)
@@ -172,8 +172,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));
+ WebInputEventResult dispatchResult = m_workerObject->dispatchEvent(event);
+ postTaskToWorkerGlobalScope(createCrossThreadTask(&processExceptionOnWorkerGlobalScope, exceptionId, dispatchResult != WebInputEventResult::NotHandled));
}
void WorkerMessagingProxy::reportConsoleMessage(MessageSource source, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)

Powered by Google App Engine
This is Rietveld 408576698