Name Description Size Coverage
ImportMap.cpp 39047 -
ImportMap.h A helper class to report warning to ScriptLoaderInterface. 4814 -
LoadContextBase.cpp 2176 -
LoadContextBase.h LoadContextBase LoadContexts augment the loading of a ScriptLoadRequest. This class is used as a base for all LoadContexts, and provides shared functionality. 2089 60 %
LoadedScript.cpp 16109 -
LoadedScript.h Set the mBaseURL, based on aChannel. aOriginalURI is the result of aChannel->GetOriginalURI. 26919 93 %
ModuleLoaderBase.cpp 64390 -
ModuleLoaderBase.h [DOMDOC] Shared Classic/Module Script Methods The ScriptLoaderInterface defines the shared methods needed by both ScriptLoaders (loading classic scripts) and ModuleLoaders (loading module scripts). These include: * Error Logging * Generating the compile options * Optional: Caching ScriptLoaderInterface does not provide any implementations. It enables the ModuleLoaderBase to reference back to the behavior implemented by a given ScriptLoader. Not all methods will be used by all ModuleLoaders. For example, caching does not apply to workers, as we only work with source text there. Fully virtual methods are implemented by all. 23740 50 %
ModuleLoadRequest.cpp 5634 -
ModuleLoadRequest.h 4899 95 %
moz.build 789 -
ResolvedModuleSet.h 2769 -
ResolveResult.h ResolveResult is used to store the result of 'resolving a module specifier', which could be a resolution record on success or a ResolveError on failure. 1750 82 %
ScriptFetchOptions.h ScriptFetchOptions loosely corresponds to HTML's "script fetch options", https://html.spec.whatwg.org/multipage/webappapis.html#script-fetch-options with the exception of the following properties: integrity metadata The integrity metadata used for the initial fetch. This is implemented in ScriptLoadRequest, as it changes for every ScriptLoadRequest. referrerPolicy For a module script, its referrerPolicy will be updated if there is a HTTP Response 'REFERRER-POLICY' header, given this value may be different for every ScriptLoadRequest, so we store it directly in ScriptLoadRequest. In the case of classic scripts without dynamic import, this object is used once. For modules, this object is propogated throughout the module tree. If there is a dynamically imported module in any type of script, the ScriptFetchOptions object will be propogated from its importer. 4514 100 %
ScriptKind.h 404 -
ScriptLoadRequest.cpp aNonce = 8088 -
ScriptLoadRequest.h ScriptLoadRequest ScriptLoadRequest is a generic representation of a request/response for JavaScript file that will be loaded by a Script/Module loader. This representation is used by the following: - DOM ScriptLoader / ModuleLoader - worker ScriptLoader / ModuleLoader - worklet ScriptLoader - SyncModuleLoader The ScriptLoadRequest contains information specific to the current request, such as the kind of script (classic, module, etc), and the reference to the LoadedScript which contains the information independent of the current request, such as the URI, the ScriptFetchOptions, etc. Relationship to ScriptLoadContext: ScriptLoadRequest and ScriptLoadContexts have a circular pointer. A ScriptLoadContext augments the loading of a ScriptLoadRequest by providing additional information regarding the loading and evaluation behavior (see the ScriptLoadContext class for details). In terms of responsibility, the ScriptLoadRequest represents "What" is being loaded, and the ScriptLoadContext represents "How". TODO: see if we can use it in the jsshell script loader. We need to either remove ISUPPORTS or find a way to encorporate that in the jsshell. We would then only have one implementation of the script loader, and it would be tested whenever jsshell tests are run. This would mean finding another way to create ScriptLoadRequest lists. 12786 100 %
ScriptLoadRequestList.cpp 2117 -
ScriptLoadRequestList.h 1331 -