fune/docshell
Rob Wu 8b6f2a74f2 Bug 1826867 - Use NS_GetFinalChannelURI instead of GetURI in SessionHistoryEntry a=dmeehan
When redirects are involved, `DocumentLoadListener::DoOnStartRequest`
may call `ReplaceLoadingSessionHistoryEntryForLoad`, which updates the
history entry with the destination of a redirect. But if the redirection
target is a `moz-extension:`-URL, the URL becomes a jar:file:/file: URL.
This is because SessionHistoryInfo (in SessionHistoryEntry.cpp) looks up
the URL with `nsIChannel::GetURI`. For `moz-extension:`-URLs, the
underlying channel has a `jar:file:` or `file:` URL, as provided by
ExtensionProtocolHandler (via SubstitutingProtocolHandler::NewChannel).
For details, see https://bugzilla.mozilla.org/show_bug.cgi?id=1826867#c7

To fix this, this patch switches to `NS_GetFinalChannelURI` instead. For
more history on this type of bug and SessionHistoryInfo, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1826867#c9

Original Revision: https://phabricator.services.mozilla.com/D234333

Differential Revision: https://phabricator.services.mozilla.com/D236901
2025-02-08 13:31:59 +00:00
..
base Bug 1889406 - Notify the focus/active BC to content process for subframes when BrowserParent is first created r=dom-core,hsivonen a=RyanVM 2024-09-19 17:10:51 +00:00
build Bug 1894958: Let's name this page more accurately r=timhuang 2024-06-05 02:04:40 +00:00
shistory Bug 1826867 - Use NS_GetFinalChannelURI instead of GetURI in SessionHistoryEntry a=dmeehan 2025-02-08 13:31:59 +00:00
test Bug 1913000 - Add more rate limiting to History interface. r=emilio a=RyanVM 2024-10-01 18:13:16 +00:00
moz.build Bug 1859890 - batch 14 convert xpcshell.ini -> .toml. r=aryx,dom-storage-reviewers,jesup 2023-11-28 01:02:01 +00:00