diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:40:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:40:09 +0000 |
commit | c1701504b2366542c32c5e6eeff1ba62cc75f8f6 (patch) | |
tree | 81b15ef2846efcdbb09422dd283399e769cb7ef9 /dom/workers | |
parent | Releasing progress-linux version 115.10.0esr-1~progress7.99u1. (diff) | |
download | firefox-esr-c1701504b2366542c32c5e6eeff1ba62cc75f8f6.tar.xz firefox-esr-c1701504b2366542c32c5e6eeff1ba62cc75f8f6.zip |
Merging upstream version 115.11.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dom/workers/ScriptLoader.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/dom/workers/ScriptLoader.cpp b/dom/workers/ScriptLoader.cpp index 315be95ffe..2cf48d8498 100644 --- a/dom/workers/ScriptLoader.cpp +++ b/dom/workers/ScriptLoader.cpp @@ -1764,12 +1764,6 @@ void ReportLoadError(ErrorResult& aRv, nsresult aLoadResult, NS_ConvertUTF16toUTF8(aScriptURL).get()); switch (aLoadResult) { - case NS_ERROR_FILE_NOT_FOUND: - case NS_ERROR_NOT_AVAILABLE: - case NS_ERROR_CORRUPTED_CONTENT: - aRv.Throw(NS_ERROR_DOM_NETWORK_ERR); - break; - case NS_ERROR_MALFORMED_URI: case NS_ERROR_DOM_SYNTAX_ERR: aRv.ThrowSyntaxError(err); @@ -1785,7 +1779,7 @@ void ReportLoadError(ErrorResult& aRv, nsresult aLoadResult, // make it impossible for consumers to realize that our error was // NS_BINDING_ABORTED. aRv.Throw(aLoadResult); - return; + break; case NS_ERROR_DOM_BAD_URI: // This is actually a security error. @@ -1793,15 +1787,16 @@ void ReportLoadError(ErrorResult& aRv, nsresult aLoadResult, aRv.ThrowSecurityError(err); break; + case NS_ERROR_FILE_NOT_FOUND: + case NS_ERROR_NOT_AVAILABLE: + case NS_ERROR_CORRUPTED_CONTENT: + case NS_ERROR_DOM_NETWORK_ERR: + // For lack of anything better, go ahead and throw a NetworkError here. + // We don't want to throw a JS exception, because for toplevel script + // loads that would get squelched. default: - // For lack of anything better, go ahead and throw a NetworkError here. - // We don't want to throw a JS exception, because for toplevel script - // loads that would get squelched. - aRv.ThrowNetworkError(nsPrintfCString( - "Failed to load worker script at %s (nsresult = 0x%" PRIx32 ")", - NS_ConvertUTF16toUTF8(aScriptURL).get(), - static_cast<uint32_t>(aLoadResult))); - return; + aRv.Throw(NS_ERROR_DOM_NETWORK_ERR); + break; } } |