Skip to content

Commit d0a0cc4

Browse files
committed
Updates for Firefox 1.2.11
1 parent ab12f8d commit d0a0cc4

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
common.prefix=chrome://web-developer/content
22
description=Adds a menu and a toolbar with various web developer tools.
3-
version=1.2.10
3+
version=1.2.11

source/firefox/javascript/cookies/cookies.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,15 @@ WebDeveloper.Cookies.canEditLocalCookie = function()
5858
// Deletes a cookie
5959
WebDeveloper.Cookies.deleteCookie = function(cookie)
6060
{
61-
Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2).remove(cookie.host, cookie.name, cookie.path, false, false);
61+
// Try to delete the cookie without origin attributes
62+
try
63+
{
64+
Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2).remove(cookie.host, cookie.name, cookie.path, false);
65+
}
66+
catch(exception)
67+
{
68+
Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2).remove(cookie.host, cookie.name, cookie.path, false, cookie.originAttributes);
69+
}
6270
};
6371

6472
// Returns all cookies
@@ -75,14 +83,15 @@ WebDeveloper.Cookies.getAllCookies = function()
7583
cookie = {};
7684
cookieObject = cookieEnumeration.getNext().QueryInterface(Components.interfaces.nsICookie2);
7785

78-
cookie.expires = cookieObject.expires;
79-
cookie.host = cookieObject.host;
80-
cookie.httpOnly = cookieObject.isHttpOnly;
81-
cookie.name = cookieObject.name;
82-
cookie.path = cookieObject.path;
83-
cookie.secure = cookieObject.isSecure;
84-
cookie.session = cookieObject.isSession;
85-
cookie.value = cookieObject.value;
86+
cookie.expires = cookieObject.expires;
87+
cookie.host = cookieObject.host;
88+
cookie.httpOnly = cookieObject.isHttpOnly;
89+
cookie.name = cookieObject.name;
90+
cookie.originAttributes = cookieObject.originAttributes;
91+
cookie.path = cookieObject.path;
92+
cookie.secure = cookieObject.isSecure;
93+
cookie.session = cookieObject.isSession;
94+
cookie.value = cookieObject.value;
8695

8796
allCookies.push(cookie);
8897
}

0 commit comments

Comments
 (0)