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

Side by Side Diff: third_party/WebKit/Source/core/dom/ModuleScript.h

Issue 2838043002: [ES6 modules] Introduce ModuleScript::CreateInstantiationError (Closed)
Patch Set: revert const change Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ModuleScript_h 5 #ifndef ModuleScript_h
6 #define ModuleScript_h 6 #define ModuleScript_h
7 7
8 #include "bindings/core/v8/ScriptModule.h" 8 #include "bindings/core/v8/ScriptModule.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 ~ModuleScript() override = default; 43 ~ModuleScript() override = default;
44 44
45 ScriptModule& Record() { return record_; } 45 ScriptModule& Record() { return record_; }
46 const KURL& BaseURL() const { return base_url_; } 46 const KURL& BaseURL() const { return base_url_; }
47 47
48 ModuleInstantiationState InstantiationState() const { 48 ModuleInstantiationState InstantiationState() const {
49 return instantiation_state_; 49 return instantiation_state_;
50 } 50 }
51 51
52 v8::Local<v8::Value> CreateInstantiationError(v8::Isolate* isolate) const {
53 return instantiation_error_.NewLocal(isolate);
54 }
55
52 // Implements Step 7.1 of: 56 // Implements Step 7.1 of:
53 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri pt-graph-fetching-procedure 57 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri pt-graph-fetching-procedure
54 void SetInstantiationErrorAndClearRecord(ScriptValue error); 58 void SetInstantiationErrorAndClearRecord(ScriptValue error);
55 // Implements Step 7.2 of: 59 // Implements Step 7.2 of:
56 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri pt-graph-fetching-procedure 60 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri pt-graph-fetching-procedure
57 void SetInstantiationSuccess(); 61 void SetInstantiationSuccess();
58 62
59 ParserDisposition ParserState() const { return parser_state_; } 63 ParserDisposition ParserState() const { return parser_state_; }
60 WebURLRequest::FetchCredentialsMode CredentialsMode() const { 64 WebURLRequest::FetchCredentialsMode CredentialsMode() const {
61 return credentials_mode_; 65 return credentials_mode_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip t-parser 120 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip t-parser
117 const ParserDisposition parser_state_; 121 const ParserDisposition parser_state_;
118 122
119 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip t-credentials-mode 123 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip t-credentials-mode
120 const WebURLRequest::FetchCredentialsMode credentials_mode_; 124 const WebURLRequest::FetchCredentialsMode credentials_mode_;
121 }; 125 };
122 126
123 } // namespace blink 127 } // namespace blink
124 128
125 #endif 129 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698