diff options
author | Jon Coppeard <jcoppeard@mozilla.com> | 2020-08-02 07:20:25 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-08-30 09:33:58 +0000 |
commit | d8686de401388c036ee02432cbcfa7b41272217d (patch) | |
tree | 0c246ecf5c07a91543ffcb292519aa663d88c445 /dom/script/ScriptLoader.cpp | |
parent | c8a38346c88995b4ba7e07a225c3a8ba860567c6 (diff) | |
download | UXP-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/script/ScriptLoader.cpp')
-rw-r--r-- | dom/script/ScriptLoader.cpp | 2 |
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; } |