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

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

Issue 2811993007: Worker: Remove cross-thread PostTask functions from WorkerLoaderProxy (Closed)
Patch Set: address review comments Created 3 years, 8 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/InProcessWorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index 2adcdb0ccfbb00ea0d79c4130361e24a6d152c09..d57fa30e908ac29b29b0d34918a0d08648b81f95 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -176,11 +176,15 @@ void InProcessWorkerMessagingProxy::DispatchErrorEvent(
if (worker_object_->DispatchEvent(event) != DispatchEventResult::kNotCanceled)
return;
- PostTaskToWorkerGlobalScope(
- BLINK_FROM_HERE,
- CrossThreadBind(&InProcessWorkerObjectProxy::ProcessUnhandledException,
- CrossThreadUnretained(worker_object_proxy_.get()),
- exception_id, CrossThreadUnretained(GetWorkerThread())));
+ // The HTML spec requires to queue an error event using the DOM manipulation
+ // task source.
+ // https://html.spec.whatwg.org/multipage/workers.html#runtime-script-errors-2
+ TaskRunnerHelper::Get(TaskType::kDOMManipulation, GetWorkerThread())
+ ->PostTask(BLINK_FROM_HERE,
+ CrossThreadBind(
+ &InProcessWorkerObjectProxy::ProcessUnhandledException,
+ CrossThreadUnretained(worker_object_proxy_.get()),
+ exception_id, CrossThreadUnretained(GetWorkerThread())));
}
void InProcessWorkerMessagingProxy::WorkerThreadCreated() {

Powered by Google App Engine
This is Rietveld 408576698