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 | 2d8029c6e77dc5e18fdd9cfc92ce6c41c761e53f (patch) | |
tree | 48ef9b1d4da51634336b041e1e01bf538584eb01 /dom/script | |
parent | 4c92acc856c888c9e16af0e267ab32c44401b73f (diff) | |
download | uxp-2d8029c6e77dc5e18fdd9cfc92ce6c41c761e53f.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
Diffstat (limited to 'dom/script')
-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; |