| 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 bc3ae8e24cccebd3e96c750cdc1d05a845ab0716..e5fb1fae307ede3751cffe7f20d2cd204a5768b1 100644
|
| --- a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
|
| @@ -77,12 +77,20 @@ void ModulatorImpl::FetchTreeInternal(const ModuleScriptFetchRequest& request,
|
| const AncestorList& ancestor_list,
|
| ModuleGraphLevel level,
|
| ModuleTreeClient* client) {
|
| + // We ensure module-related code is not executed without the flag.
|
| + // https://crbug.com/715376
|
| + CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled());
|
| +
|
| tree_linker_registry_->Fetch(request, ancestor_list, level, this, client);
|
| }
|
|
|
| void ModulatorImpl::FetchSingle(const ModuleScriptFetchRequest& request,
|
| ModuleGraphLevel level,
|
| SingleModuleClient* client) {
|
| + // We ensure module-related code is not executed without the flag.
|
| + // https://crbug.com/715376
|
| + CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled());
|
| +
|
| map_->FetchSingleModuleScript(request, level, client);
|
| }
|
|
|
| @@ -90,6 +98,10 @@ void ModulatorImpl::FetchNewSingleModule(
|
| const ModuleScriptFetchRequest& request,
|
| ModuleGraphLevel level,
|
| ModuleScriptLoaderClient* client) {
|
| + // We ensure module-related code is not executed without the flag.
|
| + // https://crbug.com/715376
|
| + CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled());
|
| +
|
| loader_registry_->Fetch(request, level, this, fetcher_.Get(), client);
|
| }
|
|
|
| @@ -141,6 +153,10 @@ inline ExecutionContext* ModulatorImpl::GetExecutionContext() const {
|
| void ModulatorImpl::ExecuteModule(const ModuleScript* module_script) {
|
| // https://html.spec.whatwg.org/#run-a-module-script
|
|
|
| + // We ensure module-related code is not executed without the flag.
|
| + // https://crbug.com/715376
|
| + CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled());
|
| +
|
| // 1. "Let settings be the settings object of s."
|
| // The settings object is |this|.
|
|
|
|
|