Bug 1658082 - Part 2: Remove duplicate information from InternalLoad IPC messages, r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D87467
This commit is contained in:
Nika Layzell
2020-08-26 19:20:06 +00:00
parent 7b558ce0be
commit 1d159a5aea
8 changed files with 46 additions and 25 deletions

View File

@@ -743,6 +743,8 @@ nsDocShell::LoadURI(nsDocShellLoadState* aLoadState, bool aSetNavigating) {
MOZ_ASSERT(
(aLoadState->LoadFlags() & INTERNAL_LOAD_FLAGS_LOADURI_SETUP_FLAGS) == 0,
"Should not have these flags set");
MOZ_ASSERT(aLoadState->TargetBrowsingContext().IsNull(),
"Targeting doesn't occur until InternalLoad");
if (!aLoadState->TriggeringPrincipal()) {
MOZ_ASSERT(false, "LoadURI must have a triggering principal");
@@ -8114,6 +8116,8 @@ uint32_t nsDocShell::DetermineContentType() {
nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
MOZ_ASSERT(aLoadState, "need a load state!");
MOZ_ASSERT(!aLoadState->Target().IsEmpty(), "should have a target here!");
MOZ_ASSERT(aLoadState->TargetBrowsingContext().IsNull(),
"should not have picked target yet");
nsresult rv = NS_OK;
RefPtr<BrowsingContext> targetContext;
@@ -8306,8 +8310,8 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
aLoadState->SetTargetBrowsingContext(targetContext);
//
// Transfer the load to the target BrowsingContext... Pass empty string as the
// window target name from to prevent recursive retargeting!
// Transfer the load to the target BrowsingContext... Clear the window target
// name to the empty string to prevent recursive retargeting!
//
// No window target
aLoadState->SetTarget(EmptyString());