summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-02-19 13:10:29 +0100
committerMoonchild <moonchild@palemoon.org>2023-02-19 13:10:29 +0100
commit078a424cf335e6ea27933d427e7979c604bfc0cc (patch)
treea8921b3328a411d4f9bef48e2a5ec4641d877087 /dom
parent576ac835f0bb752a8acd055d7985bfee33b1325a (diff)
downloaduxp-078a424cf335e6ea27933d427e7979c604bfc0cc.tar.gz
[DOM] Check whether module load request was already cancelled when a load fails
Diffstat (limited to 'dom')
-rw-r--r--dom/script/ModuleLoadRequest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/dom/script/ModuleLoadRequest.cpp b/dom/script/ModuleLoadRequest.cpp
index ec924ea7a4..2abc6236e8 100644
--- a/dom/script/ModuleLoadRequest.cpp
+++ b/dom/script/ModuleLoadRequest.cpp
@@ -148,6 +148,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();