diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-01 21:12:16 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-01 21:12:16 +0000 |
commit | 8a0bbea83332b5f90d09e6945f89bdc627b1792f (patch) | |
tree | 48ef9b1d4da51634336b041e1e01bf538584eb01 | |
parent | 57580073bb62980c2a1c43752d2410d0e4461d0e (diff) | |
download | aura-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.cpp | 6 |
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; |