forked from mirrors/gecko-dev
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 |
||
|---|---|---|
| .. | ||
| browser | ||
| marionette | ||
| mochitest | ||
| xpcshell | ||