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

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

Issue 2715803004: Introduce ThreadableLoadingContext: make threaded loading code one step away from Document (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/ThreadedMessagingProxyBase.cpp
diff --git a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
index 62dd73a0c2f5e904f0d7cf3100eb56ac0fce72a3..f5cf18a7ea7912480fac1288030951b13649faa8 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
@@ -6,9 +6,9 @@
#include "bindings/core/v8/SourceLocation.h"
#include "core/dom/Document.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/frame/Deprecation.h"
#include "core/loader/DocumentLoader.h"
+#include "core/loader/ThreadableLoadingContext.h"
#include "core/workers/WorkerInspectorProxy.h"
#include "core/workers/WorkerThreadStartupData.h"
#include "wtf/CurrentTime.h"
@@ -77,9 +77,14 @@ void ThreadedMessagingProxyBase::postTaskToLoader(
->postTask(BLINK_FROM_HERE, std::move(task));
}
-ExecutionContext* ThreadedMessagingProxyBase::getLoaderExecutionContext() {
+ThreadableLoadingContext*
+ThreadedMessagingProxyBase::getThreadableLoadingContext() {
DCHECK(isParentContextThread());
- return getExecutionContext();
+ if (!m_loadingContext) {
+ m_loadingContext =
+ ThreadableLoadingContext::create(*toDocument(m_executionContext));
+ }
+ return m_loadingContext;
}
void ThreadedMessagingProxyBase::countFeature(UseCounter::Feature feature) {

Powered by Google App Engine
This is Rietveld 408576698