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

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

Issue 2642113002: Worker: Reduce use of ExecutionContextTask in core/workers (Closed)
Patch Set: fix build failures 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/InProcessWorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index 563e9fb5baa76a9c3a0d52eb022ed1b5e6dc1c09..80a09f28f9cf15d5b26a6c6ae311b49d91562f50 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -28,7 +28,6 @@
#include "core/workers/InProcessWorkerMessagingProxy.h"
#include "core/dom/Document.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/dom/SecurityContext.h"
#include "core/events/ErrorEvent.h"
#include "core/events/MessageEvent.h"
@@ -43,6 +42,7 @@
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerInspectorProxy.h"
#include "core/workers/WorkerThreadStartupData.h"
+#include "platform/CrossThreadFunctional.h"
#include "platform/WebTaskRunner.h"
#include "wtf/WTF.h"
#include <memory>
@@ -141,7 +141,7 @@ void InProcessWorkerMessagingProxy::postMessageToWorkerGlobalScope(
// A message event is an activity and may initiate another activity.
m_workerGlobalScopeHasPendingActivity = true;
++m_unconfirmedMessageCount;
- std::unique_ptr<ExecutionContextTask> task = createCrossThreadTask(
+ std::unique_ptr<WTF::CrossThreadClosure> task = crossThreadBind(
&InProcessWorkerObjectProxy::processMessageFromWorkerObject,
crossThreadUnretained(&workerObjectProxy()), std::move(message),
WTF::passed(std::move(channels)),
@@ -189,7 +189,7 @@ void InProcessWorkerMessagingProxy::workerThreadCreated() {
DCHECK_EQ(0u, m_unconfirmedMessageCount);
m_unconfirmedMessageCount = m_queuedEarlyTasks.size();
for (auto& queuedTask : m_queuedEarlyTasks) {
- std::unique_ptr<ExecutionContextTask> task = createCrossThreadTask(
+ std::unique_ptr<WTF::CrossThreadClosure> task = crossThreadBind(
&InProcessWorkerObjectProxy::processMessageFromWorkerObject,
crossThreadUnretained(&workerObjectProxy()),
queuedTask->message.release(),

Powered by Google App Engine
This is Rietveld 408576698