| 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 17cec9d0fc62b5659c4cf828a80a3e9d91022405..8e29c8384bd443f5f21ee5846a3681526e635b5f 100644
|
| --- a/third_party/WebKit/Source/core/dom/ModuleScript.h
|
| +++ b/third_party/WebKit/Source/core/dom/ModuleScript.h
|
| @@ -19,6 +19,8 @@
|
|
|
| namespace blink {
|
|
|
| +class ScriptModuleResolver;
|
| +
|
| // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-instantiation-state
|
| enum class ModuleInstantiationState {
|
| kUninstantiated,
|
| @@ -42,8 +44,7 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase {
|
| }
|
| ~ModuleScript() override = default;
|
|
|
| - ScriptModule& Record() { return record_; }
|
| - void ClearRecord() { record_ = ScriptModule(); }
|
| + const ScriptModule& Record() const { return record_; }
|
| const KURL& BaseURL() const { return base_url_; }
|
|
|
| ModuleInstantiationState InstantiationState() const {
|
| @@ -51,7 +52,7 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase {
|
| }
|
|
|
| void SetInstantiationSuccess();
|
| - void SetInstantiationError(v8::Isolate*, v8::Local<v8::Value> error);
|
| + void SetInstantiationErrorAndClearRecord(ScriptValue error);
|
|
|
| ParserDisposition ParserState() const { return parser_state_; }
|
| WebURLRequest::FetchCredentialsMode CredentialsMode() const {
|
| @@ -59,6 +60,10 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase {
|
| }
|
| const String& Nonce() const { return nonce_; }
|
|
|
| + v8::Local<v8::Value> CreateInstantiationError(v8::Isolate* isolate) const {
|
| + return instantiation_error_.NewLocal(isolate);
|
| + }
|
| +
|
| DECLARE_TRACE();
|
| DECLARE_TRACE_WRAPPERS();
|
|
|
|
|