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 4e6c2dfa6359913d46c5658ea1f9679ff941f3ff..6df1e5931aabb17c874023166794898a17bf767d 100644 |
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h |
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h |
@@ -42,17 +42,14 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase { |
} |
~ModuleScript() override = default; |
- ScriptModule& Record() { return record_; } |
+ const ScriptModule& Record() const { return record_; } |
+ void ClearRecord() { record_ = ScriptModule(); } |
const KURL& BaseURL() const { return base_url_; } |
ModuleInstantiationState InstantiationState() const { |
return instantiation_state_; |
} |
- v8::Local<v8::Value> CreateInstantiationError(v8::Isolate* isolate) const { |
- return instantiation_error_.NewLocal(isolate); |
- } |
- |
// Implements Step 7.1 of: |
// https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure |
void SetInstantiationErrorAndClearRecord(ScriptValue error); |
@@ -60,6 +57,10 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase { |
// https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure |
void SetInstantiationSuccess(); |
+ v8::Local<v8::Value> CreateInstantiationError(v8::Isolate* isolate) const { |
+ return instantiation_error_.NewLocal(isolate); |
+ } |
+ |
ParserDisposition ParserState() const { return parser_state_; } |
WebURLRequest::FetchCredentialsMode CredentialsMode() const { |
return credentials_mode_; |