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

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

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: snapshot 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/dom/ModuleScript.cpp
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.cpp b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
index 0ab530f2e7bf380eb06370d210bd3475a855d34e..278fd85293ed88eedd869f6befad84d2037f2560 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
@@ -6,6 +6,19 @@
namespace blink {
+void ModuleScript::setInstantiationError(ScriptValue error) {
+ DCHECK_EQ(m_instantiationState, ModuleInstantiationState::Uninstantiated);
+ m_instantiationState = ModuleInstantiationState::Errored;
+
+ DCHECK(!error.isEmpty());
+ m_instantiationError = error;
+}
+
+void ModuleScript::setInstantiationSuccess() {
+ DCHECK_EQ(m_instantiationState, ModuleInstantiationState::Uninstantiated);
+ m_instantiationState = ModuleInstantiationState::Instantiated;
+}
+
DEFINE_TRACE(ModuleScript) {}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModuleScript.h ('k') | third_party/WebKit/Source/core/dom/ScriptLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698