| 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 #include "core/loader/modulescript/ModuleScriptLoader.h" | 5 #include "core/loader/modulescript/ModuleScriptLoader.h" |
| 6 | 6 |
| 7 #include "core/dom/Modulator.h" | 7 #include "core/dom/Modulator.h" |
| 8 #include "core/dom/ModuleScript.h" | 8 #include "core/dom/ModuleScript.h" |
| 9 #include "core/loader/modulescript/ModuleScriptLoaderClient.h" | 9 #include "core/loader/modulescript/ModuleScriptLoaderClient.h" |
| 10 #include "core/loader/modulescript/ModuleScriptLoaderRegistry.h" | 10 #include "core/loader/modulescript/ModuleScriptLoaderRegistry.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // Step 6: "...return null, and abort these steps." | 237 // Step 6: "...return null, and abort these steps." |
| 238 if (result.IsNull()) | 238 if (result.IsNull()) |
| 239 return nullptr; | 239 return nullptr; |
| 240 // Step 7. Set script's module record to result. | 240 // Step 7. Set script's module record to result. |
| 241 // Step 8. Set script's base URL to the script base URL provided. | 241 // Step 8. Set script's base URL to the script base URL provided. |
| 242 // Step 9. Set script's cryptographic nonce to the cryptographic nonce | 242 // Step 9. Set script's cryptographic nonce to the cryptographic nonce |
| 243 // provided. | 243 // provided. |
| 244 // Step 10. Set script's parser state to the parser state. | 244 // Step 10. Set script's parser state to the parser state. |
| 245 // Step 11. Set script's credentials mode to the credentials mode provided. | 245 // Step 11. Set script's credentials mode to the credentials mode provided. |
| 246 // Step 12. Return script. | 246 // Step 12. Return script. |
| 247 return ModuleScript::Create(result, url, nonce, parser_state, | 247 return ModuleScript::Create(modulator, result, url, nonce, parser_state, |
| 248 credentials_mode); | 248 credentials_mode); |
| 249 } | 249 } |
| 250 | 250 |
| 251 DEFINE_TRACE(ModuleScriptLoader) { | 251 DEFINE_TRACE(ModuleScriptLoader) { |
| 252 visitor->Trace(modulator_); | 252 visitor->Trace(modulator_); |
| 253 visitor->Trace(module_script_); | 253 visitor->Trace(module_script_); |
| 254 visitor->Trace(registry_); | 254 visitor->Trace(registry_); |
| 255 visitor->Trace(client_); | 255 visitor->Trace(client_); |
| 256 ResourceOwner<ScriptResource>::Trace(visitor); | 256 ResourceOwner<ScriptResource>::Trace(visitor); |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace blink | 259 } // namespace blink |
| OLD | NEW |