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; }