mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 14:47:31 +09:00
parent
251332bb95
commit
9ee1ed3eaf
1 changed files with 23 additions and 15 deletions
|
|
@ -63,7 +63,9 @@ var gCookiesWindow = {
|
||||||
_cookieEquals: function (aCookieA, aCookieB, aStrippedHost) {
|
_cookieEquals: function (aCookieA, aCookieB, aStrippedHost) {
|
||||||
return aCookieA.rawHost == aStrippedHost &&
|
return aCookieA.rawHost == aStrippedHost &&
|
||||||
aCookieA.name == aCookieB.name &&
|
aCookieA.name == aCookieB.name &&
|
||||||
aCookieA.path == aCookieB.path;
|
aCookieA.path == aCookieB.path &&
|
||||||
|
ChromeUtils.isOriginAttributesEqual(aCookieA.originAttributes,
|
||||||
|
aCookieB.originAttributes);
|
||||||
},
|
},
|
||||||
|
|
||||||
observe: function (aCookie, aTopic, aData) {
|
observe: function (aCookie, aTopic, aData) {
|
||||||
|
|
@ -268,15 +270,19 @@ var gCookiesWindow = {
|
||||||
var item = this._getItemAtIndex(aIndex);
|
var item = this._getItemAtIndex(aIndex);
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
this._invalidateCache(aIndex - 1);
|
this._invalidateCache(aIndex - 1);
|
||||||
if (item.container)
|
if (item.container) {
|
||||||
gCookiesWindow._hosts[item.rawHost] = null;
|
gCookiesWindow._hosts[item.rawHost] = null;
|
||||||
else {
|
} else {
|
||||||
var parent = this._getItemAtIndex(item.parentIndex);
|
var parent = this._getItemAtIndex(item.parentIndex);
|
||||||
for (var i = 0; i < parent.cookies.length; ++i) {
|
for (var i = 0; i < parent.cookies.length; ++i) {
|
||||||
var cookie = parent.cookies[i];
|
var cookie = parent.cookies[i];
|
||||||
if (item.rawHost == cookie.rawHost &&
|
if (item.rawHost == cookie.rawHost &&
|
||||||
item.name == cookie.name && item.path == cookie.path)
|
item.name == cookie.name &&
|
||||||
|
item.path == cookie.path &&
|
||||||
|
ChromeUtils.isOriginAttributesEqual(item.originAttributes,
|
||||||
|
cookie.originAttributes)) {
|
||||||
parent.cookies.splice(i, removeCount);
|
parent.cookies.splice(i, removeCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -451,16 +457,17 @@ var gCookiesWindow = {
|
||||||
_makeCookieObject: function (aStrippedHost, aCookie) {
|
_makeCookieObject: function (aStrippedHost, aCookie) {
|
||||||
var host = aCookie.host;
|
var host = aCookie.host;
|
||||||
var formattedHost = host.charAt(0) == "." ? host.substring(1, host.length) : host;
|
var formattedHost = host.charAt(0) == "." ? host.substring(1, host.length) : host;
|
||||||
var c = { name : aCookie.name,
|
var c = { name : aCookie.name,
|
||||||
value : aCookie.value,
|
value : aCookie.value,
|
||||||
isDomain : aCookie.isDomain,
|
isDomain : aCookie.isDomain,
|
||||||
host : aCookie.host,
|
host : aCookie.host,
|
||||||
rawHost : aStrippedHost,
|
rawHost : aStrippedHost,
|
||||||
path : aCookie.path,
|
path : aCookie.path,
|
||||||
isSecure : aCookie.isSecure,
|
isSecure : aCookie.isSecure,
|
||||||
expires : aCookie.expires,
|
expires : aCookie.expires,
|
||||||
level : 1,
|
level : 1,
|
||||||
container : false };
|
container : false,
|
||||||
|
originAttributes: aCookie.originAttributes };
|
||||||
return c;
|
return c;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -567,7 +574,8 @@ var gCookiesWindow = {
|
||||||
blockFutureCookies = psvc.getBoolPref("network.cookie.blockFutureCookies");
|
blockFutureCookies = psvc.getBoolPref("network.cookie.blockFutureCookies");
|
||||||
for (var i = 0; i < deleteItems.length; ++i) {
|
for (var i = 0; i < deleteItems.length; ++i) {
|
||||||
var item = deleteItems[i];
|
var item = deleteItems[i];
|
||||||
this._cm.remove(item.host, item.name, item.path, blockFutureCookies);
|
this._cm.remove(item.host, item.name, item.path,
|
||||||
|
blockFutureCookies, item.originAttributes);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue