forked from mirrors/gecko-dev
Bug 1676492, when new tab page is configured to show a blank page, it should not be added to session history, r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D156303
This commit is contained in:
parent
7997a24179
commit
cc3da6c652
1 changed files with 6 additions and 1 deletions
|
|
@ -11711,8 +11711,13 @@ bool nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel) {
|
|||
if (buf.EqualsLiteral("blank")) {
|
||||
return false;
|
||||
}
|
||||
// We only want to add about:newtab if it's not privileged:
|
||||
// We only want to add about:newtab if it's not privileged, and
|
||||
// if it is not configured to show the blank page.
|
||||
if (buf.EqualsLiteral("newtab")) {
|
||||
if (!StaticPrefs::browser_newtabpage_enabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
NS_ENSURE_TRUE(aChannel, false);
|
||||
nsCOMPtr<nsIPrincipal> resultPrincipal;
|
||||
rv = nsContentUtils::GetSecurityManager()->GetChannelResultPrincipal(
|
||||
|
|
|
|||
Loading…
Reference in a new issue