Bug 1706604 - Part 3: Strip the target query parameters in BrowsingContext::LoadURI(). r=nika

We strip the target query parameters in BrowsingContext::LoadURI(). This
is needed for the loading from the RemoteWebNavigation. The parent
process will create the channel before the loading happens in the
nsDocShell in content process. So we have to strip before the channel
has been created in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D113844
This commit is contained in:
Tim Huang 2021-05-20 11:22:12 +00:00
Родитель c57fed056b
Коммит 9c7e44ddd7
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -58,6 +58,7 @@
#include "mozilla/StaticPrefs_fission.h"
#include "mozilla/StaticPrefs_page_load.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/URLQueryStringStripper.h"
#include "nsIURIFixup.h"
#include "nsIXULRuntime.h"
@ -1908,6 +1909,10 @@ nsresult BrowsingContext::LoadURI(nsDocShellLoadState* aLoadState,
wgc->SendLoadURI(this, aLoadState, aSetNavigating);
}
} else if (XRE_IsParentProcess()) {
// Strip the target query parameters before loading the URI in the parent.
// The loading in content will be handled in nsDocShell.
aLoadState->MaybeStripTrackerQueryStrings(this);
if (Canonical()->LoadInParent(aLoadState, aSetNavigating)) {
return NS_OK;
}