| 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 f10e62979a0be957aa0dd92178636818c7545eeb..577ecbab82dd01ee622704d81e0a46b07762980e 100644
|
| --- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "core/dom/CrossThreadTask.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/SecurityContext.h"
|
| +#include "core/dom/TaskRunnerHelper.h"
|
| #include "core/events/ErrorEvent.h"
|
| #include "core/events/MessageEvent.h"
|
| #include "core/frame/FrameConsole.h"
|
| @@ -43,10 +44,12 @@
|
| #include "core/origin_trials/OriginTrialContext.h"
|
| #include "core/workers/InProcessWorkerBase.h"
|
| #include "core/workers/InProcessWorkerObjectProxy.h"
|
| +#include "core/workers/ParentFrameTaskRunners.h"
|
| #include "core/workers/WorkerClients.h"
|
| #include "core/workers/WorkerGlobalScope.h"
|
| #include "core/workers/WorkerInspectorProxy.h"
|
| #include "core/workers/WorkerThreadStartupData.h"
|
| +#include "public/platform/WebTaskRunner.h"
|
| #include "wtf/WTF.h"
|
| #include <memory>
|
|
|
| @@ -82,6 +85,7 @@ InProcessWorkerMessagingProxy::InProcessWorkerMessagingProxy(InProcessWorkerBase
|
| , m_askedToTerminate(false)
|
| , m_workerInspectorProxy(WorkerInspectorProxy::create())
|
| , m_workerClients(workerClients)
|
| + , m_parentFrameTaskRunners(ParentFrameTaskRunners::create(toDocument(m_executionContext.get())))
|
| {
|
| DCHECK(isParentContextThread());
|
| DCHECK(m_workerObject);
|
| @@ -168,6 +172,8 @@ bool InProcessWorkerMessagingProxy::postTaskToWorkerGlobalScope(std::unique_ptr<
|
| void InProcessWorkerMessagingProxy::postTaskToLoader(std::unique_ptr<ExecutionContextTask> task)
|
| {
|
| DCHECK(getExecutionContext()->isDocument());
|
| + // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and use
|
| + // m_parentFrameTaskRunners->getLoadingTaskRunner() instead.
|
| getExecutionContext()->postTask(BLINK_FROM_HERE, std::move(task));
|
| }
|
|
|
| @@ -223,7 +229,7 @@ void InProcessWorkerMessagingProxy::workerObjectDestroyed()
|
| // cleared before this method gets called.
|
| DCHECK(!m_workerObject);
|
|
|
| - getExecutionContext()->postTask(BLINK_FROM_HERE, createCrossThreadTask(&InProcessWorkerMessagingProxy::workerObjectDestroyedInternal, crossThreadUnretained(this)));
|
| + m_parentFrameTaskRunners->getUnthrottledTaskRunner()->postTask(BLINK_FROM_HERE, WTF::bind(&InProcessWorkerMessagingProxy::workerObjectDestroyedInternal, unretained(this)));
|
| }
|
|
|
| void InProcessWorkerMessagingProxy::workerObjectDestroyedInternal()
|
|
|