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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.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
Index: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index 243a09dd44b8834ebbf21c8db515a82d342609d9..3ed77a5ea74f09d2ff9f5356cff8334711fd9c57 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -33,7 +33,6 @@
#include "bindings/core/v8/V8AbstractEventListener.h"
#include "core/dom/ContextLifecycleNotifier.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/dom/SuspendableObject.h"
#include "core/events/ErrorEvent.h"
#include "core/events/Event.h"
@@ -50,6 +49,7 @@
#include "core/workers/WorkerReportingProxy.h"
#include "core/workers/WorkerScriptLoader.h"
#include "core/workers/WorkerThread.h"
+#include "platform/CrossThreadFunctional.h"
#include "platform/InstanceCounters.h"
#include "platform/loader/fetch/MemoryCache.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
@@ -350,9 +350,10 @@ void WorkerGlobalScope::exceptionThrown(ErrorEvent* event) {
}
void WorkerGlobalScope::removeURLFromMemoryCache(const KURL& url) {
- m_thread->workerLoaderProxy()->postTaskToLoader(
- BLINK_FROM_HERE,
- createCrossThreadTask(&removeURLFromMemoryCacheInternal, url));
+ m_thread->getParentFrameTaskRunners()
+ ->get(TaskType::Networking)
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(&removeURLFromMemoryCacheInternal, url));
}
KURL WorkerGlobalScope::virtualCompleteURL(const String& url) const {

Powered by Google App Engine
This is Rietveld 408576698