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

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

Issue 2539443004: Worker: Move ParentFrameTaskRunners from WorkerReportingProxy to ObjectProxy (Closed)
Patch Set: rebase Created 3 years, 11 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/WorkerThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
index 05ce373b41ae40cd28096e9b21ad9b0bc3344524..2ba48389950245b3303ef50ef2f0c6933056bc1c 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -35,7 +35,6 @@
#include "core/inspector/WorkerInspectorController.h"
#include "core/inspector/WorkerThreadDebugger.h"
#include "core/origin_trials/OriginTrialContext.h"
-#include "core/workers/ParentFrameTaskRunners.h"
#include "core/workers/ThreadedWorkletGlobalScope.h"
#include "core/workers/WorkerBackingThread.h"
#include "core/workers/WorkerClients.h"
@@ -288,12 +287,14 @@ bool WorkerThread::isForciblyTerminated() {
}
WorkerThread::WorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy,
- WorkerReportingProxy& workerReportingProxy)
+ WorkerReportingProxy& workerReportingProxy,
+ ParentFrameTaskRunners* parentFrameTaskRunners)
: m_workerThreadId(getNextWorkerThreadId()),
m_forcibleTerminationDelayInMs(kForcibleTerminationDelayInMs),
m_inspectorTaskRunner(WTF::makeUnique<InspectorTaskRunner>()),
m_workerLoaderProxy(workerLoaderProxy),
m_workerReportingProxy(workerReportingProxy),
+ m_parentFrameTaskRunners(parentFrameTaskRunners),
m_shutdownEvent(WTF::wrapUnique(
new WaitableEvent(WaitableEvent::ResetPolicy::Manual,
WaitableEvent::InitialState::NonSignaled))),
@@ -346,9 +347,7 @@ void WorkerThread::terminateInternal(TerminationMode mode) {
case TerminationMode::Graceful:
DCHECK(!m_forcibleTerminationTaskHandle.isActive());
m_forcibleTerminationTaskHandle =
- workerReportingProxy()
- .getParentFrameTaskRunners()
- ->get(TaskType::UnspecedTimer)
+ m_parentFrameTaskRunners->get(TaskType::UnspecedTimer)
->postDelayedCancellableTask(
BLINK_FROM_HERE,
WTF::bind(&WorkerThread::mayForciblyTerminateExecution,
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThread.h ('k') | third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698