Bug 1108547 - Part 1: Inherit the correct private browsing status on new windows created for targeted navigations; r=jdm

This commit is contained in:
Ehsan Akhgari
2015-01-21 21:01:19 -05:00
parent 7d51a91018
commit d97d1e00e1
2 changed files with 11 additions and 3 deletions

View File

@@ -9635,9 +9635,13 @@ nsDocShell::InternalLoad(nsIURI * aURI,
nsAutoCString spec;
if (aURI)
aURI->GetSpec(spec);
nsAutoString features;
if (mInPrivateBrowsing) {
features.AssignLiteral("private");
}
rv = win->OpenNoNavigate(NS_ConvertUTF8toUTF16(spec),
name, // window name
EmptyString(), // Features
features,
getter_AddRefs(newWin));
// In some cases the Open call doesn't actually result in a new