From 255c7f6f3aab6c82912e9ea7450f1a69bf17f848 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 1 Jul 2020 21:12:16 +0000 Subject: 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 --- dom/script/ScriptLoader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dom/script') 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 urls; -- cgit v1.2.3