Skip to content

Commit

Permalink
Removed deprecated calls with nsICookieManager2
Browse files Browse the repository at this point in the history
Previous calls would fail on Thunderbird 52, getCookiesFromHost() needs
an  extra parameter and remove() uses the cookie attributes.
  • Loading branch information
Garoe committed May 9, 2017
1 parent 653c2a0 commit 2d15859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ TKPManager.prototype.onSignOut = function(event) {
this.debug("\tFound " + numCookies + " cookies from " + cookieOrigin);

if (numCookies > 0) {
let cookies = cookieManager.getCookiesFromHost(cookieOrigin);
let cookies = cookieManager.getCookiesFromHost(cookieOrigin, {});
let cookie = null;
while (cookies.hasMoreElements()){
cookie = cookies.getNext().QueryInterface(Ci.nsICookie2);
this.debug("\tRemoving cookie [" + cookie.host + "], [" + cookie.name + "], [" + cookie.path + "]");
cookieManager.remove(cookie.host, cookie.name, cookie.path, false, cookieOrigin);
cookieManager.remove(cookie.host, cookie.name, cookie.path, false, cookie.originAttributes);
}
}

Expand Down

0 comments on commit 2d15859

Please sign in to comment.