summaryrefslogtreecommitdiffstats
path: root/dom/script/ScriptLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/script/ScriptLoader.cpp')
-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;