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

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

Issue 2886593002: [ES6 modules] ModuleTreeLinker::Instantiate shouldn't proceed on invalid context (Closed)
Patch Set: hasvalidcontxt 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
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 16081ff5eb37c2bf63ca026d05ba3e5108da2972..546f5d51b280e59045035b0432f160181132cdda 100644
--- a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
+++ b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
@@ -111,6 +111,10 @@ ModuleScript* ModulatorImpl::GetFetchedModuleScript(const KURL& url) {
return map_->GetFetchedModuleScript(url);
}
+bool ModulatorImpl::HasValidContext() {
+ return script_state_->ContextIsValid();
+}
+
ScriptModule ModulatorImpl::CompileModule(
const String& provided_source,
const String& url_str,

Powered by Google App Engine
This is Rietveld 408576698