Bug 1503837 - Bug 1503654 follow-up: Adapt to inverted logic of ChromeUtils.isOriginAttributesEqual in cookies dialog. r=jorgk
authoraceman <acelists@atlas.sk>
Thu, 08 Nov 2018 12:12:00 +0100
changeset 33675 e6e4d75191c4f55833b0b8ae7e494344b41c73e9
parent 33674 668ac5092dad846cffa09dc1b5cc999af74dd901
child 33676 a5fe17002ce32b945b3cdba35ef0a2e16f932e4e
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1503837, 1503654
Bug 1503837 - Bug 1503654 follow-up: Adapt to inverted logic of ChromeUtils.isOriginAttributesEqual in cookies dialog. r=jorgk
mail/components/preferences/cookies.js
--- a/mail/components/preferences/cookies.js
+++ b/mail/components/preferences/cookies.js
@@ -54,18 +54,18 @@ var gCookiesWindow = {
 
     this._saveState();
   },
 
   _cookieEquals(aCookieA, aCookieB, aStrippedHost) {
     return aCookieA.rawHost == aStrippedHost &&
            aCookieA.name == aCookieB.name &&
            aCookieA.path == aCookieB.path &&
-           !ChromeUtils.isOriginAttributesEqual(aCookieA.originAttributes,
-                                                aCookieB.originAttributes);
+           ChromeUtils.isOriginAttributesEqual(aCookieA.originAttributes,
+                                               aCookieB.originAttributes);
   },
 
   observe(aCookie, aTopic, aData) {
     if (aTopic != "cookie-changed")
       return;
 
     if (aCookie instanceof Ci.nsICookie) {
       var strippedHost = this._makeStrippedHost(aCookie.host);
@@ -264,18 +264,18 @@ var gCookiesWindow = {
         gCookiesWindow._hosts[item.rawHost] = null;
       } else {
         let parent = this._getItemAtIndex(item.parentIndex);
         for (let i = 0; i < parent.cookies.length; ++i) {
           var cookie = parent.cookies[i];
           if (item.rawHost == cookie.rawHost &&
               item.name == cookie.name &&
               item.path == cookie.path &&
-              !ChromeUtils.isOriginAttributesEqual(item.originAttributes,
-                                                   cookie.originAttributes)) {
+              ChromeUtils.isOriginAttributesEqual(item.originAttributes,
+                                                  cookie.originAttributes)) {
             parent.cookies.splice(i, removeCount);
           }
         }
       }
     },
 
     _invalidateCache(aIndex) {
       this._cacheValid = Math.min(this._cacheValid, aIndex);