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

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

Issue 2535653002: Worker: Deprecate PostTaskToMainExecutionContext (Closed)
Patch Set: Created 4 years, 1 month 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 6bf1e577caba0a4ab64342deb4ec85eb6b8051cc..615bb9ad614aa9eaade96313d7ef2692251c313e 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
@@ -72,13 +72,6 @@ void InProcessWorkerObjectProxy::postMessageToWorkerObject(
passed(std::move(channels))));
}
-void InProcessWorkerObjectProxy::postTaskToMainExecutionContext(
- std::unique_ptr<ExecutionContextTask> task) {
- // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and use
- // getParentFrameTaskRunners() instead.
- getExecutionContext()->postTask(BLINK_FROM_HERE, std::move(task));
-}
-
void InProcessWorkerObjectProxy::confirmMessageFromWorkerObject() {
getParentFrameTaskRunners()
->get(TaskType::Internal)
@@ -101,6 +94,23 @@ void InProcessWorkerObjectProxy::startPendingActivityTimer() {
m_nextIntervalInSec = std::min(m_nextIntervalInSec * 1.5, m_maxIntervalInSec);
}
+void InProcessWorkerObjectProxy::countFeature(UseCounter::Feature feature) {
+ getParentFrameTaskRunners()
+ ->get(TaskType::Internal)
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(&InProcessWorkerMessagingProxy::countFeature,
+ m_messagingProxyWeakPtr, feature));
+}
+
+void InProcessWorkerObjectProxy::countDeprecation(UseCounter::Feature feature) {
+ getParentFrameTaskRunners()
+ ->get(TaskType::Internal)
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(&InProcessWorkerMessagingProxy::countDeprecation,
+ m_messagingProxyWeakPtr, feature));
+}
+
void InProcessWorkerObjectProxy::reportException(
const String& errorMessage,
std::unique_ptr<SourceLocation> location,

Powered by Google App Engine
This is Rietveld 408576698