Bug 1487113 - nsICacheInfoChannel.preferAlternativeDataType() should expose alt-data as optional if required, r=valentin

Differential Revision: https://phabricator.services.mozilla.com/D20200
This commit is contained in:
Andrea Marchesini
2019-02-19 07:38:31 +00:00
parent f9a72c192a
commit dbce6a100e
25 changed files with 200 additions and 67 deletions

View File

@@ -1293,7 +1293,7 @@ nsresult ScriptLoader::StartLoad(ScriptLoadRequest* aRequest) {
// registered.
LOG(("ScriptLoadRequest (%p): Maybe request bytecode", aRequest));
cic->PreferAlternativeDataType(nsContentUtils::JSBytecodeMimeType(),
EmptyCString());
EmptyCString(), true);
} else {
// If we are explicitly loading from the sources, such as after a
// restarted request, we might still want to save the bytecode after.
@@ -1302,7 +1302,7 @@ 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, EmptyCString());
cic->PreferAlternativeDataType(kNullMimeType, EmptyCString(), true);
}
}