summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorJon Coppeard <jcoppeard@mozilla.com>2020-08-02 07:20:25 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-30 09:33:58 +0000
commitd8686de401388c036ee02432cbcfa7b41272217d (patch)
tree0c246ecf5c07a91543ffcb292519aa663d88c445 /dom
parentc8a38346c88995b4ba7e07a225c3a8ba860567c6 (diff)
downloadUXP-d8686de401388c036ee02432cbcfa7b41272217d.tar
UXP-d8686de401388c036ee02432cbcfa7b41272217d.tar.gz
UXP-d8686de401388c036ee02432cbcfa7b41272217d.tar.lz
UXP-d8686de401388c036ee02432cbcfa7b41272217d.tar.xz
UXP-d8686de401388c036ee02432cbcfa7b41272217d.zip
Issue #618 - Record module dependency before starting fetch so that error
handling works correctly Ref BZ 1395896
Diffstat (limited to 'dom')
-rw-r--r--dom/script/ScriptLoader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index 3dbbcacea..4050caada 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -793,6 +793,7 @@ ScriptLoader::StartFetchingModuleAndDependencies(ModuleLoadRequest* aRequest,
childRequest->mIsInline = false;
childRequest->mReferrerPolicy = aRequest->mReferrerPolicy;
childRequest->mParent = aRequest;
+ aRequest->mImports.AppendElement(childRequest);
RefPtr<GenericPromise> ready = childRequest->mReady.Ensure(__func__);
@@ -803,7 +804,6 @@ ScriptLoader::StartFetchingModuleAndDependencies(ModuleLoadRequest* aRequest,
return ready;
}
- aRequest->mImports.AppendElement(childRequest);
return ready;
}