fune/toolkit/components/extensions/test
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
..
browser Bug 1907501 - Update browser_ext_themes_findbar.js a=diannaS 2024-09-06 22:06:59 +00:00
marionette Bug 1892038 - Add missing marionette manifest path r=webdriver-reviewers,jdescottes,robwu 2024-04-29 23:04:48 +00:00
mochitest Bug 1932263 - Support persistent listeners in notifications API a=RyanVM 2025-01-15 16:02:38 +00:00
xpcshell Bug 1826867 - Use NS_GetFinalChannelURI instead of GetURI in SessionHistoryEntry a=dmeehan 2025-02-08 13:31:59 +00:00