fune/docshell/shistory
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
..
ChildSHistory.cpp Bug 1913000 - Add more rate limiting to History interface. r=emilio a=RyanVM 2024-10-01 18:13:16 +00:00
ChildSHistory.h
moz.build
nsIBFCacheEntry.idl
nsISHEntry.idl
nsISHistory.idl Bug 1886222 - Start reload by calling reload in the parent. r=Gijs,canadahonk,smaug, a=dsmith 2024-06-19 05:49:45 +00:00
nsISHistoryListener.idl
nsSHEntry.cpp
nsSHEntry.h
nsSHEntryShared.cpp
nsSHEntryShared.h
nsSHistory.cpp
nsSHistory.h
SessionHistoryEntry.cpp Bug 1826867 - Use NS_GetFinalChannelURI instead of GetURI in SessionHistoryEntry a=dmeehan 2025-02-08 13:31:59 +00:00
SessionHistoryEntry.h