[tor-commits] [torbutton/master] Bug 12947: Adapt session storage blocker to ESR 31.

mikeperry at torproject.org mikeperry at torproject.org
Tue Sep 30 00:25:54 UTC 2014


commit 3831da21b6bac9e6cf21ba7d4e48217a6b14e73a
Author: Georg Koppen <gk at torproject.org>
Date:   Fri Sep 5 16:12:23 2014 +0000

    Bug 12947: Adapt session storage blocker to ESR 31.
---
 src/components/tbSessionStore.js |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/components/tbSessionStore.js b/src/components/tbSessionStore.js
index 039e223..7281bcf 100644
--- a/src/components/tbSessionStore.js
+++ b/src/components/tbSessionStore.js
@@ -85,8 +85,15 @@ TBSessionBlocker.prototype =
   {
       if (topic != "sessionstore-state-write") return;
       this.logger.log(3, "Got Session Store observe: "+topic);
-      subject = subject.QueryInterface(Ci.nsISupportsString);
-
+      // In ESR 31 |subject| is |null| in non-private browsing mode. Thus, we
+      // are not able to clean anything. In Private Browsing Mode nothing is
+      // written in the first place and therefore no |sessionstore-state-write|
+      // notification is emitted.
+      try {
+        subject = subject.QueryInterface(Ci.nsISupportsString);
+      } catch (e) {
+        this.logger.log(3, "We got no data to clean");
+      }
       // Bug 1506: This is the only important bit, other than
       // the registration goop. You don't even need the JSON 
       // garbage...





More information about the tor-commits mailing list