Index: third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp |
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp |
index 5fcfdd284766c90f50626a56730a8a82ea584b60..6a69361ef833335416331b6c87a09d999fbf8ddc 100644 |
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp |
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp |
@@ -110,27 +110,21 @@ void InProcessWorkerObjectProxy::postMessageToPageInspector(const String& messag |
} |
} |
-void InProcessWorkerObjectProxy::didEvaluateWorkerScript(bool) |
-{ |
- startPendingActivityTimer(); |
-} |
- |
-void InProcessWorkerObjectProxy::workerGlobalScopeStarted(WorkerOrWorkletGlobalScope* globalScope) |
+void InProcessWorkerObjectProxy::didCreateWorkerGlobalScope(WorkerOrWorkletGlobalScope* globalScope) |
{ |
DCHECK(!m_workerGlobalScope); |
m_workerGlobalScope = toWorkerGlobalScope(globalScope); |
m_timer = wrapUnique(new Timer<InProcessWorkerObjectProxy>(this, &InProcessWorkerObjectProxy::checkPendingActivity)); |
} |
-void InProcessWorkerObjectProxy::workerGlobalScopeClosed() |
+void InProcessWorkerObjectProxy::didEvaluateWorkerScript(bool) |
{ |
- getParentFrameTaskRunners()->get(TaskType::Internal)->postTask(BLINK_FROM_HERE, crossThreadBind(&InProcessWorkerMessagingProxy::terminateGlobalScope, crossThreadUnretained(m_messagingProxy))); |
+ startPendingActivityTimer(); |
} |
-void InProcessWorkerObjectProxy::workerThreadTerminated() |
+void InProcessWorkerObjectProxy::didCloseWorkerGlobalScope() |
{ |
- // This will terminate the MessagingProxy. |
- getParentFrameTaskRunners()->get(TaskType::Internal)->postTask(BLINK_FROM_HERE, crossThreadBind(&InProcessWorkerMessagingProxy::workerThreadTerminated, crossThreadUnretained(m_messagingProxy))); |
+ getParentFrameTaskRunners()->get(TaskType::Internal)->postTask(BLINK_FROM_HERE, crossThreadBind(&InProcessWorkerMessagingProxy::terminateGlobalScope, crossThreadUnretained(m_messagingProxy))); |
} |
void InProcessWorkerObjectProxy::willDestroyWorkerGlobalScope() |
@@ -139,6 +133,12 @@ void InProcessWorkerObjectProxy::willDestroyWorkerGlobalScope() |
m_workerGlobalScope = nullptr; |
} |
+void InProcessWorkerObjectProxy::didTerminateWorkerThread() |
+{ |
+ // This will terminate the MessagingProxy. |
+ getParentFrameTaskRunners()->get(TaskType::Internal)->postTask(BLINK_FROM_HERE, crossThreadBind(&InProcessWorkerMessagingProxy::workerThreadTerminated, crossThreadUnretained(m_messagingProxy))); |
+} |
+ |
InProcessWorkerObjectProxy::InProcessWorkerObjectProxy(InProcessWorkerMessagingProxy* messagingProxy) |
: m_messagingProxy(messagingProxy) |
, m_nextIntervalInSec(kDefaultIntervalInSec) |