Skip to content

Commit

Permalink
Bug 1533406 - Extend private browsing lifetime for gecko view too. r=…
Browse files Browse the repository at this point in the history
…smaug

Private browsing data kept getting cleared each time a new tab was created
since gecko thought there were no more private windows. Also, fixes a typo
in the case of "windowtype".

Differential Revision: https://phabricator.services.mozilla.com/D60330

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Brendan Dahl committed Jan 22, 2020
1 parent 815211d commit d4e28b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dom/xul/nsXULElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ nsXULElement::~nsXULElement() {}

void nsXULElement::MaybeUpdatePrivateLifetime() {
if (AttrValueIs(kNameSpaceID_None, nsGkAtoms::windowtype,
NS_LITERAL_STRING("navigator:browser"), eCaseMatters)) {
NS_LITERAL_STRING("navigator:browser"), eCaseMatters) ||
AttrValueIs(kNameSpaceID_None, nsGkAtoms::windowtype,
NS_LITERAL_STRING("navigator:geckoview"), eCaseMatters)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion mobile/android/chrome/geckoview/geckoview.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ var ModuleManager = {
const windowType = aSettings.isPopup
? "navigator:popup"
: "navigator:geckoview";
window.document.documentElement.setAttribute("windowType", windowType);
window.document.documentElement.setAttribute("windowtype", windowType);

this.forEach(module => {
if (module.impl) {
Expand Down

0 comments on commit d4e28b0

Please sign in to comment.