[tbb-commits] [torbutton/master] Bug 21201.2: Isolate by firstPartyDomain from OriginAttributes

gk at torproject.org gk at torproject.org
Tue Apr 4 08:59:53 UTC 2017


commit 7fffae283aaf12d745b64a95a57ee4d8c9d05457
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date:   Sun Jan 22 22:03:34 2017 -0800

    Bug 21201.2: Isolate by firstPartyDomain from OriginAttributes
---
 src/components/domain-isolator.js | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/components/domain-isolator.js b/src/components/domain-isolator.js
index dbdca1b..a537429 100644
--- a/src/components/domain-isolator.js
+++ b/src/components/domain-isolator.js
@@ -29,11 +29,6 @@ let mozilla = {};
 mozilla.protocolProxyService = Cc["@mozilla.org/network/protocol-proxy-service;1"]
                                  .getService(Ci.nsIProtocolProxyService);
 
-// __mozilla.thirdPartyUtil__.
-// Mozilla's Thirdy Party Utilities, for figuring out first party domain.
-mozilla.thirdPartyUtil = Cc["@mozilla.org/thirdpartyutil;1"]
-                           .getService(Ci.mozIThirdPartyUtil);
-
 // __mozilla.registerProxyChannelFilter(filterFunction, positionIndex)__.
 // Registers a proxy channel filter with the Mozilla Protocol Proxy Service,
 // which will help to decide the proxy to be used for a given channel.
@@ -133,11 +128,8 @@ tor.isolateCircuitsByDomain = function () {
       return aProxy;
 
     try {
-      let channel = aChannel.QueryInterface(Ci.nsIChannel),
-          firstPartyURI = mozilla.thirdPartyUtil.getFirstPartyURIFromChannel(channel, true)
-                            .QueryInterface(Ci.nsIURI),
-          firstPartyDomain = mozilla.thirdPartyUtil
-                               .getFirstPartyHostForIsolation(firstPartyURI),
+      let channel = aChannel.QueryInterface(Ci.nsIChannel);
+          firstPartyDomain = channel.loadInfo.originAttributes.firstPartyDomain,
           proxy = aProxy.QueryInterface(Ci.nsIProxyInfo),
           replacementProxy = tor.socksProxyCredentials(aProxy, firstPartyDomain);
       logger.eclog(3, "tor SOCKS: " + channel.URI.spec + " via " +





More information about the tbb-commits mailing list