diff options
author | Moonchild <moonchild@palemoon.org> | 2023-02-19 13:10:29 +0100 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-02-19 13:10:29 +0100 |
commit | 078a424cf335e6ea27933d427e7979c604bfc0cc (patch) | |
tree | a8921b3328a411d4f9bef48e2a5ec4641d877087 /dom | |
parent | 576ac835f0bb752a8acd055d7985bfee33b1325a (diff) | |
download | uxp-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.cpp | 5 |
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(); |