Bug 1969895 - Do not try encoding JSON modules. a=RyanVM

Original Revision: https://phabricator.services.mozilla.com/D252181

Differential Revision: https://phabricator.services.mozilla.com/D252260
This commit is contained in:
Tooru Fujisawa
2025-06-03 03:12:51 +00:00
committed by rvandermeulen@mozilla.com
parent bc8ea6d91e
commit 59706292b9
6 changed files with 95 additions and 0 deletions

View File

@@ -2643,6 +2643,12 @@ void ScriptLoader::CalculateBytecodeCacheFlag(ScriptLoadRequest* aRequest) {
return;
}
if (aRequest->IsModuleRequest() &&
aRequest->AsModuleRequest()->mModuleType != JS::ModuleType::JavaScript) {
aRequest->MarkSkippedBytecodeEncoding();
return;
}
// We need the nsICacheInfoChannel to exist to be able to open the alternate
// data output stream. This pointer would only be non-null if the bytecode was
// activated at the time the channel got created in StartLoad.