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

Unified Diff: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp

Issue 2709193002: WorkerLoaderProxy: stop accessing cross-thread execution context (Closed)
Patch Set: . Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
index fdaaf3f39be0df5949ba1f944bec40d991c6f524..6f23acd87d90d83daeb68c080cc522190dc39f25 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
@@ -4,7 +4,6 @@
#include "core/loader/ThreadableLoader.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/loader/DocumentThreadableLoader.h"
#include "core/loader/ThreadableLoaderClient.h"
#include "core/loader/WorkerThreadableLoader.h"
@@ -325,16 +324,13 @@ class WorkerThreadableLoaderTestHelper : public ThreadableLoaderTestHelper,
}
// WorkerLoaderProxyProvider methods.
- void postTaskToLoader(const WebTraceLocation& location,
- std::unique_ptr<ExecutionContextTask> task) override {
+ void postTaskToLoader(
+ const WebTraceLocation& location,
+ std::unique_ptr<WTF::CrossThreadClosure> task) override {
DCHECK(m_workerThread);
DCHECK(m_workerThread->isCurrentThread());
m_parentFrameTaskRunners->get(TaskType::Networking)
- ->postTask(
- BLINK_FROM_HERE,
- crossThreadBind(&ExecutionContextTask::performTaskIfContextIsValid,
- WTF::passed(std::move(task)),
- wrapCrossThreadWeakPersistent(&document())));
+ ->postTask(BLINK_FROM_HERE, std::move(task));
}
void postTaskToWorkerGlobalScope(
@@ -344,6 +340,8 @@ class WorkerThreadableLoaderTestHelper : public ThreadableLoaderTestHelper,
m_workerThread->postTask(location, std::move(task));
}
+ ExecutionContext* getLoaderExecutionContext() override { return &document(); }
+
RefPtr<SecurityOrigin> m_securityOrigin;
std::unique_ptr<MockWorkerReportingProxy> m_mockWorkerReportingProxy;
std::unique_ptr<WorkerThreadForTest> m_workerThread;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698