Skip to content

Commit

Permalink
Revert "Workaround to remove private tabs after File - Exit (for #36)"
Browse files Browse the repository at this point in the history
This reverts commit f78d3b4.
  • Loading branch information
Infocatcher committed Apr 17, 2013
1 parent f78d3b4 commit 3050a47
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function shutdown(params, reason) {

var windowsObserver = {
initialized: false,
_hasQuitObserver: false,
init: function(reason) {
if(this.initialized)
return;
Expand All @@ -52,10 +51,6 @@ var windowsObserver = {
this.destroyWindow(window, reason);
}, this);
Services.ww.unregisterNotification(this);
if(this._hasQuitObserver) {
this._hasQuitObserver = false;
Services.obs.removeObserver(this, "quit-application-requested");
}

this.unloadStyles();
this.restoreAppButtonWidth();
Expand All @@ -77,8 +72,6 @@ var windowsObserver = {
}
else if(topic == "domwindowclosed")
this.destroyWindow(subject, WINDOW_CLOSED);
else if(topic == "quit-application-requested")
this.closeAllPrivateTabs();
},

handleEvent: function(e) {
Expand Down Expand Up @@ -133,13 +126,6 @@ var windowsObserver = {
this.ensureTitleModifier(document);
this.patchBrowsers(gBrowser, true);
window.setTimeout(function() {
// Trick to remove private tabs on browser exit: we should call
// addObserver() after resource:///modules/sessionstore/SessionStore.jsm
// to be notified before SessionStore will save windows data
if(!this._hasQuitObserver) {
this._hasQuitObserver = true;
Services.obs.addObserver(this, "quit-application-requested", false);
}
// We don't need patched functions right after window "load", so it's better to
// apply patches after any other extensions
this.patchTabBrowserDND(window, gBrowser, true);
Expand Down Expand Up @@ -513,15 +499,6 @@ var windowsObserver = {
else
this.forgetClosedTab(window);
},
closeAllPrivateTabs: function() {
if(prefs.get("savePrivateTabsInSessions"))
return;
_log("closeAllPrivateTabs()");
this.windows.forEach(function(window) {
if(!this.isPrivateWindow(window))
this.closePrivateTabs(window);
}, this);
},
closePrivateTabs: function(window) {
var gBrowser = window.gBrowser;
var tabs = gBrowser.tabs;
Expand Down

0 comments on commit 3050a47

Please sign in to comment.