OLD | NEW |
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return instantiation_state_; | 57 return instantiation_state_; |
58 } | 58 } |
59 | 59 |
60 // Implements Step 7.1 of: | 60 // Implements Step 7.1 of: |
61 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure | 61 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure |
62 void SetInstantiationErrorAndClearRecord(ScriptValue error); | 62 void SetInstantiationErrorAndClearRecord(ScriptValue error); |
63 // Implements Step 7.2 of: | 63 // Implements Step 7.2 of: |
64 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure | 64 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure |
65 void SetInstantiationSuccess(); | 65 void SetInstantiationSuccess(); |
66 | 66 |
| 67 v8::Local<v8::Value> CreateInstantiationError(v8::Isolate* isolate) const { |
| 68 return instantiation_error_.NewLocal(isolate); |
| 69 } |
| 70 |
67 ParserDisposition ParserState() const { return parser_state_; } | 71 ParserDisposition ParserState() const { return parser_state_; } |
68 WebURLRequest::FetchCredentialsMode CredentialsMode() const { | 72 WebURLRequest::FetchCredentialsMode CredentialsMode() const { |
69 return credentials_mode_; | 73 return credentials_mode_; |
70 } | 74 } |
71 const String& Nonce() const { return nonce_; } | 75 const String& Nonce() const { return nonce_; } |
72 | 76 |
73 DECLARE_TRACE(); | 77 DECLARE_TRACE(); |
74 DECLARE_TRACE_WRAPPERS(); | 78 DECLARE_TRACE_WRAPPERS(); |
75 | 79 |
76 private: | 80 private: |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip
t-credentials-mode | 150 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip
t-credentials-mode |
147 const WebURLRequest::FetchCredentialsMode credentials_mode_; | 151 const WebURLRequest::FetchCredentialsMode credentials_mode_; |
148 | 152 |
149 // For CSP check. | 153 // For CSP check. |
150 const String source_text_; | 154 const String source_text_; |
151 }; | 155 }; |
152 | 156 |
153 } // namespace blink | 157 } // namespace blink |
154 | 158 |
155 #endif | 159 #endif |
OLD | NEW |