From ad6e4242a926c94130cedcfe832d815cded1ce72 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 13 Feb 2012 20:46:24 -0500 Subject: [PATCH] Don't break launch on Fx 3.6 --- chrome/content/zotero/xpcom/cookieSandbox.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/chrome/content/zotero/xpcom/cookieSandbox.js b/chrome/content/zotero/xpcom/cookieSandbox.js index 2f68f1853c..0ff7e212f4 100755 --- a/chrome/content/zotero/xpcom/cookieSandbox.js +++ b/chrome/content/zotero/xpcom/cookieSandbox.js @@ -117,13 +117,13 @@ Zotero.CookieSandbox.Observer = new function() { getService(Components.interfaces.nsIObserverService), observing = false; - this.trackedBrowsers = new WeakMap(); - this.trackedInterfaceRequestors = new WeakMap(); - /** * Registers cookie manager and observer, if necessary */ this.register = function(CookieSandbox) { + this.trackedBrowsers = new WeakMap(); + this.trackedInterfaceRequestors = new WeakMap(); + if(!observing) { Zotero.debug("CookieSandbox: Registering observers"); for each(var topic in observeredTopics) observerService.addObserver(this, topic, false); @@ -135,11 +135,6 @@ Zotero.CookieSandbox.Observer = new function() { * Implements nsIObserver to watch for new cookies and to add sandboxed cookies */ this.observe = function(channel, topic) { - if(topic == "quit-application" && cookieSandboxes.length) { - Zotero.debug("WARNING: A CookieSandbox for "+cookieSandboxes[0].URI.spec+" was still open on shutdown"); - return; - } - channel.QueryInterface(Components.interfaces.nsIHttpChannel); var trackedBy, tested, browser, callbacks, channelURI = channel.URI.spec,