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-02 07:20:25 +0000
commit8447c4d8a3c8e8a80c83de99dc71d64a39d6fa83 (patch)
tree73940cd86c1c21fbdc6613b7e50dd5ce3b279e27 /dom
parente94f9dcced92b4bde5c60185a86d3d801359ea65 (diff)
downloadUXP-8447c4d8a3c8e8a80c83de99dc71d64a39d6fa83.tar
UXP-8447c4d8a3c8e8a80c83de99dc71d64a39d6fa83.tar.gz
UXP-8447c4d8a3c8e8a80c83de99dc71d64a39d6fa83.tar.lz
UXP-8447c4d8a3c8e8a80c83de99dc71d64a39d6fa83.tar.xz
UXP-8447c4d8a3c8e8a80c83de99dc71d64a39d6fa83.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;
}