Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
index 9f0e0963d6edaa02f0cde45b4c88bd069791d8ba..1f87bc26c29d592380909710fa12cafb802856be 100644 |
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
@@ -32,6 +32,7 @@ |
#include <memory> |
#include "core/dom/Document.h" |
+#include "core/dom/TaskRunnerHelper.h" |
#include "core/events/MessageEvent.h" |
#include "core/inspector/ConsoleMessage.h" |
#include "core/loader/FrameLoadRequest.h" |
@@ -254,7 +255,8 @@ void WebSharedWorkerImpl::PostTaskToWorkerGlobalScope( |
const WebTraceLocation& location, |
std::unique_ptr<WTF::CrossThreadClosure> task) { |
DCHECK(IsMainThread()); |
- worker_thread_->PostTask(location, std::move(task)); |
+ TaskRunnerHelper::Get(TaskType::kNetworking, GetWorkerThread()) |
+ ->PostTask(location, std::move(task)); |
} |
ThreadableLoadingContext* WebSharedWorkerImpl::GetThreadableLoadingContext() { |
@@ -268,11 +270,12 @@ ThreadableLoadingContext* WebSharedWorkerImpl::GetThreadableLoadingContext() { |
void WebSharedWorkerImpl::Connect( |
std::unique_ptr<WebMessagePortChannel> web_channel) { |
DCHECK(IsMainThread()); |
- GetWorkerThread()->PostTask( |
- BLINK_FROM_HERE, |
- CrossThreadBind(&WebSharedWorkerImpl::ConnectTaskOnWorkerThread, |
- WTF::CrossThreadUnretained(this), |
- WTF::Passed(std::move(web_channel)))); |
+ TaskRunnerHelper::Get(TaskType::kDOMManipulation, GetWorkerThread()) |
+ ->PostTask( |
+ BLINK_FROM_HERE, |
+ CrossThreadBind(&WebSharedWorkerImpl::ConnectTaskOnWorkerThread, |
+ WTF::CrossThreadUnretained(this), |
+ WTF::Passed(std::move(web_channel)))); |
} |
void WebSharedWorkerImpl::ConnectTaskOnWorkerThread( |