diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-01 21:12:16 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-10 18:29:13 +0000 |
commit | 255c7f6f3aab6c82912e9ea7450f1a69bf17f848 (patch) | |
tree | a0957624f1766c5bfc7b96d578650560af779f8d /dom | |
parent | 5ffe27bb03d8ac7b979007721c2699e891c77268 (diff) | |
download | uxp-255c7f6f3aab6c82912e9ea7450f1a69bf17f848.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
Diffstat (limited to 'dom')
-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 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; |