summaryrefslogtreecommitdiffstats
path: root/dom/script/ScriptLoader.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-08 10:50:53 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-30 09:32:52 +0000
commit2f145b6eda95c08a76711f0393e4d9ebe13a5f92 (patch)
treeb2a00ced844cbe2eee6eb81ed585894d0c550d10 /dom/script/ScriptLoader.cpp
parent06a092d08ef5c20306d5c0b9a5f0bfd14ae28cad (diff)
downloadUXP-2f145b6eda95c08a76711f0393e4d9ebe13a5f92.tar
UXP-2f145b6eda95c08a76711f0393e4d9ebe13a5f92.tar.gz
UXP-2f145b6eda95c08a76711f0393e4d9ebe13a5f92.tar.lz
UXP-2f145b6eda95c08a76711f0393e4d9ebe13a5f92.tar.xz
UXP-2f145b6eda95c08a76711f0393e4d9ebe13a5f92.zip
Issue #618 - Fix error events fired when loading JS module dependencies fail
When module dependencies fail, don't spam with errors for each import; only fire the error event once. Ref: BZ 1421259
Diffstat (limited to 'dom/script/ScriptLoader.cpp')
-rw-r--r--dom/script/ScriptLoader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index a53098974..1426c30c9 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -2327,7 +2327,8 @@ ScriptLoader::OnStreamComplete(nsIIncrementalStreamLoader* aLoader,
MOZ_ASSERT(!modReq->IsTopLevel());
MOZ_ASSERT(!modReq->isInList());
modReq->Cancel();
- FireScriptAvailable(rv, request);
+ // A single error is fired for the top level module, so don't use
+ // FireScriptAvailable here.
} else if (mParserBlockingRequest == request) {
MOZ_ASSERT(!request->isInList());
mParserBlockingRequest = nullptr;