[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbutton/master] Bump Torbuton version to pre-release.



commit 609d5c25f035368c9fcc5c5a764f6529b8f612ca
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date:   Tue Dec 3 16:18:40 2013 -0800

    Bump Torbuton version to pre-release.
    
    To aid in build debugging.
---
 src/chrome/content/stanford-safecache.js |   19 ++++++++++++++++---
 src/install.rdf                          |    2 +-
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/chrome/content/stanford-safecache.js b/src/chrome/content/stanford-safecache.js
index 48f6d88..a333e29 100644
--- a/src/chrome/content/stanford-safecache.js
+++ b/src/chrome/content/stanford-safecache.js
@@ -61,7 +61,10 @@ function SSC_dump(msg) {
 
 function SSC_RequestListener(controller) {
   this.controller = controller;
-  this.cookie_permissions = Cc["@mozilla.org/cookie/permission;1"].getService(Ci.nsICookiePermission);
+  this.thirdPartyUtil = Cc["@mozilla.org/thirdpartyutil;1"].
+                            getService(Ci.mozIThirdPartyUtil);
+  this.cookie_permissions = Cc["@mozilla.org/cookie/permission;1"].
+                                getService(Ci.nsICookiePermission);
 }
 
 SSC_RequestListener.prototype =
@@ -77,11 +80,13 @@ SSC_RequestListener.prototype =
         subject.QueryInterface(Components.interfaces.nsIHttpChannel);
         subject.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
         subject.QueryInterface(Components.interfaces.nsICachingChannel);
+        subject.QueryInterface(Components.interfaces.nsIChannel);
         this.onModifyRequest(subject);
       } else if (topic == 'http-on-examine-response') {
         subject.QueryInterface(Components.interfaces.nsIHttpChannel);
         subject.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
         subject.QueryInterface(Components.interfaces.nsICachingChannel);
+        subject.QueryInterface(Components.interfaces.nsIChannel);
         this.onExamineResponse(subject);
       }
     } catch(e) {try {torbutton_log(4, "SSC: "+e);} catch(ex) {}} 
@@ -135,11 +140,19 @@ SSC_RequestListener.prototype =
     } else if(!parent_host) {
       // Questionable first party interaction..
       try {
-        var anuri = this.cookie_permissions.getOriginatingURI(channel);
+        var anuri = null;
+        try {
+          anuri = this.thirdPartyUtil.getFirstPartyURI(channel, null);
+        } catch (e) {
+          torbutton_safelog(4, "FirstParty API failed to get parent: "+e, channel.URI.spec);
+          // We are not using the TBB based on ESR 24. Falling back to the old
+          // method.
+          anuri = this.cookie_permissions.getOriginatingURI(channel);
+        }
         parent_host = anuri.host;
         parent_spec = anuri.spec;
       } catch(e) {
-        torbutton_safelog(2, "Cookie API failed to get parent: "+e,channel.URI.spec);
+        torbutton_safelog(4, "Cookie API failed to get parent: "+e,channel.URI.spec);
         if (!channel.referrer) {
           torbutton_safelog(3, "SSC: No parent for ", channel.URI.spec);
         } else {
diff --git a/src/install.rdf b/src/install.rdf
index eed2a47..3dd60f7 100644
--- a/src/install.rdf
+++ b/src/install.rdf
@@ -6,7 +6,7 @@
         <em:name>Torbutton</em:name>
         <em:creator>Mike Perry</em:creator>
         <em:id>torbutton@xxxxxxxxxxxxxx</em:id>
-        <em:version>1.6.4.1</em:version>
+        <em:version>1.6.5pre</em:version>
         <em:homepageURL>https://www.torproject.org/projects/torbrowser.html.en</em:homepageURL>
         <em:optionsURL>chrome://torbutton/content/preferences.xul</em:optionsURL>
         <em:iconURL>chrome://torbutton/skin/tor.png</em:iconURL>

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits