Skip to content
Permalink
Browse files

Ensure Application.storage available

Can be not accessible from closed window
  • Loading branch information...
Infocatcher committed Sep 4, 2012
1 parent 29ed49b commit 4f00a9fa4efed85136d7043ee66f6a2f827204fa
Showing with 2 additions and 1 deletion.
  1. +2 −1 Cookies_Permissions/cookiesPermissions.js
@@ -372,6 +372,7 @@ this.permissions = {
timerId: timerId,
interval: interval,
permissions: this,
storage: Application.storage, // Object from closed window can be not available, so cache it
get timer() {
delete this.timer;
return this.timer = Components.classes["@mozilla.org/timer;1"]
@@ -385,7 +386,7 @@ this.permissions = {
destroy: function() {
this.permissions.oSvc.removeObserver(this, "quit-application-granted");
this.timer.cancel();
Application.storage.set(this.timerId, null);
this.storage.set(this.timerId, null);
this.permissions = null;
},
handleEvent: function(e) {

0 comments on commit 4f00a9f

Please sign in to comment.
You can’t perform that action at this time.