Chromium Code Reviews| 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()) |
|
haraken
2017/04/17 14:49:52
Ditto.
nhiroki
2017/04/18 05:34:38
(This will also be removed soon)
|
| + ->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()) |
|
haraken
2017/04/17 14:49:52
Why kDOMManipulation?
kinuko
2017/04/17 15:55:19
It's in the spec.
https://html.spec.whatwg.org/mu
nhiroki
2017/04/18 05:34:38
Yes, that's required by the spec (thank you for th
|
| + ->PostTask( |
| + BLINK_FROM_HERE, |
| + CrossThreadBind(&WebSharedWorkerImpl::ConnectTaskOnWorkerThread, |
| + WTF::CrossThreadUnretained(this), |
| + WTF::Passed(std::move(web_channel)))); |
| } |
| void WebSharedWorkerImpl::ConnectTaskOnWorkerThread( |