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
commitec10b65ddeab41c1eef180828de711fd900bf1e4 (patch)
tree48ef9b1d4da51634336b041e1e01bf538584eb01
parent9056191e67055c5e96ecc352e592ea9ae94a2236 (diff)
downloaduxp-ec10b65ddeab41c1eef180828de711fd900bf1e4.tar.gz
Issue #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 adc046b7c4..ffbe37f281 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;