Bug 1790765 - Replace superstitious comment in ScriptLoader::MaybeMoveToLoadedList with release assertion r=smaug
An initial try is green with this change. Differential Revision: https://phabricator.services.mozilla.com/D157304
This commit is contained in:
@@ -3628,16 +3628,10 @@ void ScriptLoader::MaybeMoveToLoadedList(ScriptLoadRequest* aRequest) {
|
||||
MOZ_ASSERT(aRequest->IsReadyToRun());
|
||||
MOZ_ASSERT(aRequest->IsTopLevel());
|
||||
|
||||
// If it's async, move it to the loaded list.
|
||||
// aRequest->GetScriptLoadContext()->mInAsyncList really _should_ be in a
|
||||
// list, but the consequences if it's not are bad enough we want to avoid
|
||||
// trying to move it if it's not.
|
||||
if (aRequest->GetScriptLoadContext()->mInAsyncList) {
|
||||
MOZ_ASSERT(aRequest->isInList());
|
||||
if (aRequest->isInList()) {
|
||||
RefPtr<ScriptLoadRequest> req = mLoadingAsyncRequests.Steal(aRequest);
|
||||
mLoadedAsyncRequests.AppendElement(req);
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(aRequest->isInList());
|
||||
RefPtr<ScriptLoadRequest> req = mLoadingAsyncRequests.Steal(aRequest);
|
||||
mLoadedAsyncRequests.AppendElement(req);
|
||||
} else if (aRequest->IsModuleRequest() &&
|
||||
aRequest->AsModuleRequest()->IsDynamicImport()) {
|
||||
// Process dynamic imports with async scripts.
|
||||
|
||||
Reference in New Issue
Block a user