From 3c824f9dfc37e5ea39f680919bb872f7827d67c8 Mon Sep 17 00:00:00 2001 From: "florian@queze.net" Date: Thu, 24 Jan 2008 22:58:09 -0800 Subject: [PATCH] Bug 410863 - Removed cookies reappear when the filter is changed. r=Mano, a1.9=beltzner --- browser/components/preferences/cookies.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/browser/components/preferences/cookies.js b/browser/components/preferences/cookies.js index f7f69374715..c9a3645a911 100644 --- a/browser/components/preferences/cookies.js +++ b/browser/components/preferences/cookies.js @@ -270,6 +270,18 @@ var gCookiesWindow = { { var removeCount = aCount === undefined ? 1 : aCount; if (this._filtered) { + // remove the cookies from the unfiltered set so that they + // don't reappear when the filter is changed. See bug 410863. + for (var i = aIndex; i < aIndex + removeCount; ++i) { + var item = this._filterSet[i]; + var parent = gCookiesWindow._hosts[item.rawHost]; + for (var j = 0; j < parent.cookies.length; ++j) { + if (item == parent.cookies[j]) { + parent.cookies.splice(j, 1); + break; + } + } + } this._filterSet.splice(aIndex, removeCount); return; }