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

Unified Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.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 | « third_party/WebKit/Source/web/WebSharedWorkerImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index 47e1ed2dff6304748a02fadadb66196a4f644d33..6b25a1db25583062bc4a1ef1de6bc7f66153d2d8 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -31,7 +31,6 @@
#include "web/WebSharedWorkerImpl.h"
#include "core/dom/Document.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/events/MessageEvent.h"
#include "core/html/HTMLFormElement.h"
#include "core/inspector/ConsoleMessage.h"
@@ -303,13 +302,9 @@ void WebSharedWorkerImpl::didTerminateWorkerThreadOnMainThread() {
void WebSharedWorkerImpl::postTaskToLoader(
const WebTraceLocation& location,
- std::unique_ptr<ExecutionContextTask> task) {
+ std::unique_ptr<WTF::CrossThreadClosure> task) {
m_parentFrameTaskRunners->get(TaskType::Networking)
- ->postTask(FROM_HERE,
- crossThreadBind(
- &ExecutionContextTask::performTaskIfContextIsValid,
- WTF::passed(std::move(task)),
- wrapCrossThreadWeakPersistent(m_loadingDocument.get())));
+ ->postTask(FROM_HERE, std::move(task));
}
void WebSharedWorkerImpl::postTaskToWorkerGlobalScope(
@@ -318,6 +313,10 @@ void WebSharedWorkerImpl::postTaskToWorkerGlobalScope(
m_workerThread->postTask(location, std::move(task));
}
+ExecutionContext* WebSharedWorkerImpl::getLoaderExecutionContext() {
+ return m_loadingDocument.get();
+}
+
void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel) {
DCHECK(isMainThread());
workerThread()->postTask(
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698