summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-01 21:12:16 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-01 21:12:16 +0000
commit8a0bbea83332b5f90d09e6945f89bdc627b1792f (patch)
tree48ef9b1d4da51634336b041e1e01bf538584eb01
parent57580073bb62980c2a1c43752d2410d0e4461d0e (diff)
downloadaura-central-8a0bbea83332b5f90d09e6945f89bdc627b1792f.tar.gz
Issue mcp-graveyard/UXP%618 - Check for failed instantiation when starting to fetch dependencies
If instantiation has failed, then also fail the load and don't fetch imports. Ref BZ: 1358882
-rw-r--r--dom/script/ScriptLoader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index adc046b7c..ffbe37f28 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -721,6 +721,12 @@ ScriptLoader::StartFetchingModuleDependencies(ModuleLoadRequest* aRequest)
{
MOZ_ASSERT(aRequest->mModuleScript);
MOZ_ASSERT(!aRequest->IsReadyToRun());
+
+ if (aRequest->mModuleScript->InstantiationFailed()) {
+ aRequest->LoadFailed();
+ return;
+ }
+
aRequest->mProgress = ModuleLoadRequest::Progress::FetchingImports;
nsCOMArray<nsIURI> urls;