Bug 343212: Clear private data...>Browsing History should also clear the 'Undo Close Tab' history, patch by Simon Bünzli <zeniko@gmail.com>, r=mconnor

git-svn-id: svn://10.0.0.236/trunk@201787 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com 2006-07-08 21:29:46 +00:00
parent 7887bc7403
commit ffda1f3281

View File

@ -312,13 +312,17 @@ SessionStoreService.prototype = {
this._uninit();
break;
case "browser:purge-session-history": // catch sanitization
this._closedWindows = [];
this._forEachBrowserWindow(function(aWindow) {
Array.forEach(aWindow.getBrowser().browsers, function(aBrowser) {
delete aBrowser.parentNode.__SS_data;
});
});
this._clearDisk();
// also clear all data about closed windows and tabs
this._closedWindows = [];
for (ix in this._windows) {
this._windows[ix]._closedTabs = [];
}
// give the tabbrowsers a chance to clear their histories first
var win = this._getMostRecentBrowserWindow();
if (win)