mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-27 02:43:07 +00:00
Bug 1035439 - Part 1: Clear private undo close tab data when leaving private browsing. r=margaret
This commit is contained in:
parent
e608e66fe1
commit
8c1f089270
@ -84,6 +84,7 @@ SessionStore.prototype = {
|
||||
observerService.addObserver(this, "application-background", true);
|
||||
observerService.addObserver(this, "ClosedTabs:StartNotifications", true);
|
||||
observerService.addObserver(this, "ClosedTabs:StopNotifications", true);
|
||||
observerService.addObserver(this, "last-pb-context-exited", true);
|
||||
break;
|
||||
case "final-ui-startup":
|
||||
observerService.removeObserver(this, "final-ui-startup");
|
||||
@ -169,6 +170,13 @@ SessionStore.prototype = {
|
||||
case "ClosedTabs:StopNotifications":
|
||||
this._notifyClosedTabs = false;
|
||||
break;
|
||||
case "last-pb-context-exited":
|
||||
// Clear private closed tab data when we leave private browsing.
|
||||
for (let [, window] in Iterator(this._windows)) {
|
||||
window.closedTabs = window.closedTabs.filter(tab => !tab.isPrivate);
|
||||
}
|
||||
this._lastClosedTabIndex = -1;
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user