import from UXP: [DOM] Check whether module load request was already cancelled when a load fails (bc50a7d3)

This commit is contained in:
2023-02-20 12:08:43 +08:00
parent 06bb203d1c
commit 4db624ccbf
+5
View File
@@ -149,6 +149,11 @@ ModuleLoadRequest::LoadFailed()
// We failed to load the source text or an error occurred unrelated to the
// content of the module (e.g. OOM).
if (IsCanceled()) {
return;
}
MOZ_ASSERT(!IsReadyToRun());
MOZ_ASSERT(!mModuleScript);
Cancel();