Bug 1436400 - Part 9: Support restarting module load request. r=jonco
After enabling bytecode cache for module script, we need to handle the SRI mismatch on bytecode cache, that requires reloading the script source again. Differential Revision: https://phabricator.services.mozilla.com/D140551
This commit is contained in:
@@ -487,7 +487,12 @@ nsresult ScriptLoader::RestartLoad(ScriptLoadRequest* aRequest) {
|
||||
// Start a new channel from which we explicitly request to stream the source
|
||||
// instead of the bytecode.
|
||||
aRequest->mProgress = ScriptLoadRequest::Progress::eLoading_Source;
|
||||
nsresult rv = StartLoad(aRequest);
|
||||
nsresult rv;
|
||||
if (aRequest->IsModuleRequest()) {
|
||||
rv = mModuleLoader->RestartModuleLoad(aRequest);
|
||||
} else {
|
||||
rv = StartLoad(aRequest);
|
||||
}
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user