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

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

Issue 2337253005: Worker: Canonicalize names of WorkerThread lifecycle events in WorkerReportingProxy (Closed)
Patch Set: fix comments Created 4 years, 3 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/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)

Powered by Google App Engine
This is Rietveld 408576698