Skip to content

Commit

Permalink
Handle "sessionstore-state-write" in SeaMonkey:
Browse files Browse the repository at this point in the history
still used old nsISessionStore
(#146)
  • Loading branch information
Infocatcher committed Aug 11, 2014
1 parent b52c9fb commit 9a88897
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bootstrap.js
Expand Up @@ -50,7 +50,7 @@ var privateTab = {
for(var window in this.windows)
this.initWindow(window, reason);
Services.ww.registerNotification(this);
if(this.platformVersion < 29) // See https://bugzilla.mozilla.org/show_bug.cgi?id=899276
if(this.platformVersion < 29 || this.isSeaMonkey) // See https://bugzilla.mozilla.org/show_bug.cgi?id=899276
Services.obs.addObserver(this, "sessionstore-state-write", false);
else if(
window
Expand Down Expand Up @@ -78,7 +78,7 @@ var privateTab = {

if(reason != APP_SHUTDOWN) {
// nsISessionStore may save data after our shutdown
if(this.platformVersion < 29)
if(this.platformVersion < 29 || this.isSeaMonkey)
Services.obs.removeObserver(this, "sessionstore-state-write");
else
this.dontSaveClosedPrivateTabs(false);
Expand Down Expand Up @@ -1247,7 +1247,11 @@ var privateTab = {
this.cleanupClosedTab(e);
},
tabClosingHandler: function(e) {
if(this.platformVersion < 29 || !prefs.get("rememberClosedPrivateTabs"))
if(
this.platformVersion < 29
|| this.isSeaMonkey
|| !prefs.get("rememberClosedPrivateTabs")
)
return;
var tab = e.originalTarget || e.target;
if(!tab.hasAttribute(this.privateAttr))
Expand Down

0 comments on commit 9a88897

Please sign in to comment.