Bug 1804086 - Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw

This is needed for doing content decoding for ORB.

Differential Revision: https://phabricator.services.mozilla.com/D172490
This commit is contained in:
Sean Feng
2023-03-22 14:21:39 +00:00
parent 3d0efa4176
commit f5713606fe
13 changed files with 108 additions and 21 deletions

View File

@@ -107,8 +107,12 @@ nsresult ModuleLoader::StartFetch(ModuleLoadRequest* aRequest) {
securityFlags |= nsILoadInfo::SEC_ALLOW_CHROME;
// Delegate Shared Behavior to base ScriptLoader
nsresult rv =
GetScriptLoader()->StartLoadInternal(aRequest, securityFlags, 0);
//
// aCharsetForPreload is passed as Nothing() because this is not a preload
// and `StartLoadInternal` is able to find the charset by using `aRequest`
// for this case.
nsresult rv = GetScriptLoader()->StartLoadInternal(
aRequest, securityFlags, 0, Nothing() /* aCharsetForPreload */);
NS_ENSURE_SUCCESS(rv, rv);
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-an-import()-module-script-graph