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

Side by Side Diff: third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp

Issue 2823483002: Make ModuleScript to have a reference to Modulator explicitly (Closed)
Patch Set: unit tests fix Created 3 years, 8 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 | « third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp ('k') | 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 #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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698