summaryrefslogtreecommitdiff
path: root/dom/script
diff options
context:
space:
mode:
Diffstat (limited to 'dom/script')
-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();