mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1870615. Avoid a few calls in opt builds in LoadInfo.cpp that we only need for an assert. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D196719
This commit is contained in:
parent
e151a8652e
commit
8907cc5504
@ -295,19 +295,13 @@ LoadInfo::LoadInfo(
|
||||
mOriginAttributes.SyncAttributesWithPrivateBrowsing(usePrivateBrowsing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For chrome docshell, the mPrivateBrowsingId remains 0 even its
|
||||
// UsePrivateBrowsing() is true, so we only update the mPrivateBrowsingId in
|
||||
// origin attributes if the type of the docshell is content.
|
||||
if (aLoadingContext) {
|
||||
nsCOMPtr<nsIDocShell> docShell = aLoadingContext->OwnerDoc()->GetDocShell();
|
||||
if (docShell) {
|
||||
if (docShell->GetBrowsingContext()->IsChrome()) {
|
||||
MOZ_ASSERT(mOriginAttributes.mPrivateBrowsingId == 0,
|
||||
"chrome docshell shouldn't have mPrivateBrowsingId set.");
|
||||
}
|
||||
}
|
||||
// For chrome docshell, the mPrivateBrowsingId remains 0 even its
|
||||
// UsePrivateBrowsing() is true, so we only update the mPrivateBrowsingId in
|
||||
// origin attributes if the type of the docshell is content.
|
||||
MOZ_ASSERT(!docShell || !docShell->GetBrowsingContext()->IsChrome() ||
|
||||
mOriginAttributes.mPrivateBrowsingId == 0,
|
||||
"chrome docshell shouldn't have mPrivateBrowsingId set.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user