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

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

Issue 2782403002: [ES6 modules] Implement #concept-module-script-instantiation-error (Closed)
Patch Set: rebased Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/dom/ModuleScript.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ModuleScript.h
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.h b/third_party/WebKit/Source/core/dom/ModuleScript.h
index 1b5329d87594cdeb4ac3afb890e0454c9fdf8907..3f0481e799ad2980692db7fb651abe367197f4b4 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h
@@ -6,7 +6,9 @@
#define ModuleScript_h
#include "bindings/core/v8/ScriptModule.h"
+#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/core/v8/TraceWrapperV8Reference.h"
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
#include "platform/loader/fetch/ResourceLoaderOptions.h"
@@ -43,17 +45,21 @@ class CORE_EXPORT ModuleScript final
void clearRecord() { m_record = ScriptModule(); }
const KURL& baseURL() const { return m_baseURL; }
+ ModuleInstantiationState instantiationState() const {
+ return m_instantiationState;
+ }
+
+ void setInstantiationSuccess();
+ void setInstantiationError(v8::Isolate*, v8::Local<v8::Value> error);
+
ParserDisposition parserState() const { return m_parserState; }
WebURLRequest::FetchCredentialsMode credentialsMode() const {
return m_credentialsMode;
}
const String& nonce() const { return m_nonce; }
- ModuleInstantiationState instantiationState() const {
- return m_instantiationState;
- }
-
DECLARE_TRACE();
+ DECLARE_VIRTUAL_TRACE_WRAPPERS();
private:
ModuleScript(ScriptModule record,
@@ -63,6 +69,7 @@ class CORE_EXPORT ModuleScript final
WebURLRequest::FetchCredentialsMode credentialsMode)
: m_record(record),
m_baseURL(baseURL),
+ m_instantiationError(this),
m_nonce(nonce),
m_parserState(parserState),
m_credentialsMode(credentialsMode) {}
@@ -83,7 +90,7 @@ class CORE_EXPORT ModuleScript final
ModuleInstantiationState::Uninstantiated;
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-instantiation-error
- // TODO(kouhei): Add a corresponding member.
+ TraceWrapperV8Reference<v8::Value> m_instantiationError;
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-nonce
const String m_nonce;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ModuleScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698