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

Unified Diff: third_party/WebKit/Source/core/dom/ModulatorImpl.cpp

Issue 2865003002: Make ModulatorImpl execution-context-agnostic (Closed)
Patch Set: Created 3 years, 7 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/core/dom/ModulatorImpl.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/core/dom/ModulatorImpl.cpp
diff --git a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
index e5e4f35dd77ff0db211c1fd7493f915e670e61ab..16081ff5eb37c2bf63ca026d05ba3e5108da2972 100644
--- a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
+++ b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
@@ -4,7 +4,6 @@
#include "core/dom/ModulatorImpl.h"
-#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
#include "core/dom/ModuleMap.h"
#include "core/dom/ModuleScript.h"
@@ -19,18 +18,15 @@
namespace blink {
ModulatorImpl* ModulatorImpl::Create(RefPtr<ScriptState> script_state,
- Document& document) {
- return new ModulatorImpl(
- std::move(script_state),
- TaskRunnerHelper::Get(TaskType::kNetworking, &document),
- document.Fetcher());
+ ResourceFetcher* resource_fetcher) {
+ return new ModulatorImpl(std::move(script_state), resource_fetcher);
}
ModulatorImpl::ModulatorImpl(RefPtr<ScriptState> script_state,
- RefPtr<WebTaskRunner> task_runner,
ResourceFetcher* fetcher)
: script_state_(std::move(script_state)),
- task_runner_(std::move(task_runner)),
+ task_runner_(
+ TaskRunnerHelper::Get(TaskType::kNetworking, script_state_.Get())),
fetcher_(fetcher),
map_(this, ModuleMap::Create(this)),
loader_registry_(ModuleScriptLoaderRegistry::Create()),
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModulatorImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698