Bug 1706615 - Part 8: Preserve the unstripped URI when doing a reload. r=smaug

To restore the stripped query parameters when ETP toggle has been set to
off, we preserve the current unstripped URI to the new loadState when
doing a reload. By doing this, it will redirect the channel back to the
unstripped URI because the loading channel is in the content blocking
allow list and it has a unstripped URI in its loadInfo.

Differential Revision: https://phabricator.services.mozilla.com/D116116
This commit is contained in:
Tim Huang
2021-06-02 19:46:22 +00:00
parent dd04813c7a
commit d19d74f38a
3 changed files with 31 additions and 3 deletions

View File

@@ -323,7 +323,8 @@ class nsDocShellLoadState final {
bool aLoadingFromActiveEntry);
void ClearLoadIsFromSessionHistory();
void MaybeStripTrackerQueryStrings(mozilla::dom::BrowsingContext* aContext);
void MaybeStripTrackerQueryStrings(mozilla::dom::BrowsingContext* aContext,
nsIURI* aCurrentUnstrippedURI = nullptr);
protected:
// Destructor can't be defaulted or inlined, as header doesn't have all type