Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D117360
This commit is contained in:
Yury Delendik
2021-09-14 20:12:51 +00:00
parent f41b7404b4
commit c65323a56c
26 changed files with 239 additions and 129 deletions

View File

@@ -1594,8 +1594,9 @@ nsresult ScriptLoader::StartLoad(ScriptLoadRequest* aRequest) {
// the bytecode cache instead of the sources, if such entry is already
// registered.
LOG(("ScriptLoadRequest (%p): Maybe request bytecode", aRequest));
cic->PreferAlternativeDataType(nsContentUtils::JSBytecodeMimeType(),
""_ns, true);
cic->PreferAlternativeDataType(
nsContentUtils::JSBytecodeMimeType(), ""_ns,
nsICacheInfoChannel::PreferredAlternativeDataDeliveryType::ASYNC);
} else {
// If we are explicitly loading from the sources, such as after a
// restarted request, we might still want to save the bytecode after.
@@ -1604,7 +1605,9 @@ nsresult ScriptLoader::StartLoad(ScriptLoadRequest* aRequest) {
// does not exist, such that we can later save the bytecode with a
// different alternative data type.
LOG(("ScriptLoadRequest (%p): Request saving bytecode later", aRequest));
cic->PreferAlternativeDataType(kNullMimeType, ""_ns, true);
cic->PreferAlternativeDataType(
kNullMimeType, ""_ns,
nsICacheInfoChannel::PreferredAlternativeDataDeliveryType::ASYNC);
}
}