Bug 1921972 - Don't add external protocol navigations to the loadgroup. r=smaug,necko-reviewers

Much like we do with downloads (bug 1656925), these don't unload the
current document.

This prevents them from having mismatched flags, which asserts, see the
test-case.

Differential Revision: https://phabricator.services.mozilla.com/D224606
This commit is contained in:
Emilio Cobos Álvarez
2024-10-06 19:33:02 +00:00
parent 2bd40fc2af
commit 0901d90ded
4 changed files with 40 additions and 9 deletions

View File

@@ -9407,8 +9407,10 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
// Don't stop current network activity for javascript: URL's since they might
// not result in any data, and thus nothing should be stopped in those cases.
// In the case where they do result in data, the javascript: URL channel takes
// care of stopping current network activity. Similarly, downloads don't
// unload this document...
// care of stopping current network activity. Similarly, downloads and
// external protocols don't unload this document...
// NOTE(emilio): This logic needs to be in sync with
// DocumentChannelChild::AsyncOpen.
if (!isJavaScript && !isDownload && !isExternalProtocol) {
// Stop any current network activity.
// Also stop content if this is a zombie doc. otherwise