Move NonSharedGlobalSyncModuleLoaderScope into its own header. It is the only
class in mozJSModuleLoader.h that genuinely needs the full ModuleLoaderBase.h
(it holds a Maybe<JS::loader::AutoOverrideModuleLoader> by value), and it is only
used by ChromeUtils.cpp and mozJSModuleLoader.cpp. With it gone, mozJSModuleLoader.h
can forward-declare mozilla::loader::SyncModuleLoader instead of including
SyncModuleLoader.h, so the component-registration translation units that only need
mozJSModuleLoader (nsAppRunner, XPCOMInit, StaticComponents, JSActorManager) no
longer pull in ModuleLoaderBase.h.
Include nsTHashMap.h directly in mozJSModuleLoader.h, which it uses for
mImportStacks but was previously getting transitively through the removed include.
Translation Units recompiled:
$ rg -l --no-ignore --hidden --glob '*.o.pp' 'ModuleLoaderBase\.h' obj-x86_64-pc-linux-gnu | wc -l
Before this patch: 20 After this patch : 15