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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/ModuleScript.h" 5 #include "core/dom/ModuleScript.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 void ModuleScript::setInstantiationError(ScriptValue error) {
10 DCHECK_EQ(m_instantiationState, ModuleInstantiationState::Uninstantiated);
11 m_instantiationState = ModuleInstantiationState::Errored;
12
13 DCHECK(!error.isEmpty());
14 m_instantiationError = error;
15 }
16
17 void ModuleScript::setInstantiationSuccess() {
18 DCHECK_EQ(m_instantiationState, ModuleInstantiationState::Uninstantiated);
19 m_instantiationState = ModuleInstantiationState::Instantiated;
20 }
21
9 DEFINE_TRACE(ModuleScript) {} 22 DEFINE_TRACE(ModuleScript) {}
10 23
11 } // namespace blink 24 } // namespace blink
OLDNEW
« 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