Bug 1800641 - Part 11: Allocate script in ScriptLoadRequest::NoCacheEntryFound. r=nbp
Depends on D197848 Differential Revision: https://phabricator.services.mozilla.com/D197849
This commit is contained in:
@@ -162,10 +162,9 @@ const ModuleLoadRequest* ScriptLoadRequest::AsModuleRequest() const {
|
||||
void ScriptLoadRequest::NoCacheEntryFound() {
|
||||
MOZ_ASSERT(IsCheckingCache());
|
||||
MOZ_ASSERT(mURI);
|
||||
mState = State::Fetching;
|
||||
}
|
||||
|
||||
void ScriptLoadRequest::EnsureScript() {
|
||||
// At the time where we check in the cache, the mBaseURL is not set, as this
|
||||
// is resolved by the network. Thus we use the mURI, for checking the cache
|
||||
// and later replace the mBaseURL using what the Channel->GetURI will provide.
|
||||
switch (mKind) {
|
||||
case ScriptKind::eClassic:
|
||||
case ScriptKind::eImportMap:
|
||||
@@ -178,6 +177,7 @@ void ScriptLoadRequest::EnsureScript() {
|
||||
MOZ_ASSERT_UNREACHABLE("EventScripts are not using ScriptLoadRequest");
|
||||
break;
|
||||
}
|
||||
mState = State::Fetching;
|
||||
}
|
||||
|
||||
void ScriptLoadRequest::SetPendingFetchingError() {
|
||||
|
||||
Reference in New Issue
Block a user