Bug 1761938 - Part 4: Give module loaders a global object field r=smaug,yulia
This gives the module loader a field for the current global, since a module map is only associated with a single global. This adds a method to Document to tell the script loader when its global changes. I'm not sure of when we do this exactly. Differential Revision: https://phabricator.services.mozilla.com/D142831
This commit is contained in:
@@ -48,8 +48,9 @@ namespace mozilla::dom {
|
||||
// DOM module loader
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
ModuleLoader::ModuleLoader(ScriptLoader* aLoader, Kind aKind)
|
||||
: ModuleLoaderBase(aLoader), mKind(aKind) {}
|
||||
ModuleLoader::ModuleLoader(ScriptLoader* aLoader,
|
||||
nsIGlobalObject* aGlobalObject, Kind aKind)
|
||||
: ModuleLoaderBase(aLoader, aGlobalObject), mKind(aKind) {}
|
||||
|
||||
ScriptLoader* ModuleLoader::GetScriptLoader() {
|
||||
return static_cast<ScriptLoader*>(mLoader.get());
|
||||
|
||||
Reference in New Issue
Block a user