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

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

Issue 2574703002: Use ParentFrameTaskRunners in WorkerLoaderProxyProvider::postTaskToLoader impls (Closed)
Patch Set: . Created 4 years 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/ThreadedMessagingProxyBase.cpp
diff --git a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
index 897f5de67684a0f0d75ae81c19c0e6a1faa88568..d08013b0705bd07675c7fafcd6fe623ba90dcae1 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
@@ -74,9 +74,12 @@ void ThreadedMessagingProxyBase::postTaskToLoader(
const WebTraceLocation& location,
std::unique_ptr<ExecutionContextTask> task) {
DCHECK(getExecutionContext()->isDocument());
- // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and use
- // m_parentFrameTaskRunners->get(TaskType::Networking) instead.
- getExecutionContext()->postTask(location, std::move(task));
+ m_parentFrameTaskRunners->get(TaskType::Networking)
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(
+ &ExecutionContextTask::performTaskIfContextIsValid,
+ WTF::passed(std::move(task)),
+ wrapCrossThreadWeakPersistent(getExecutionContext())));
}
void ThreadedMessagingProxyBase::countFeature(UseCounter::Feature feature) {

Powered by Google App Engine
This is Rietveld 408576698