Added TODO that expired cookies should be thrown out, in the unlikely event that we get one from a createCommand or editCommand.

This commit is contained in:
jonathandicarlo@jonathan-dicarlos-macbook-pro.local 2008-05-20 18:24:28 -07:00
Родитель cbc91827ec
Коммит 7dc49c82ec
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -804,6 +804,7 @@ CookieStore.prototype = {
// this assumes command.data fits the nsICookie2 interface
if ( command.data.expiry ) {
// Add only persistent cookies (those with an expiry date).
// TODO: throw out cookies with expiration date in the past?
this._cookieManager.add( command.data.host,
command.data.path,
command.data.name,
@ -866,7 +867,8 @@ CookieStore.prototype = {
// Re-add the new updated cookie:
if ( command.data.expiry ) {
/* ignore single-session cookies, add only persistent
cookies. */
cookies.
TODO: throw out cookies with expiration dates in the past?*/
this._cookieManager.add( matchingCookie.host,
matchingCookie.path,
matchingCookie.name,
@ -895,7 +897,9 @@ CookieStore.prototype = {
// host:path:name
if ( !cookie.expiry ) {
/* Skip cookies that do not have an expiration date.
(Persistent cookies have one, session-only cookies don't.) */
(Persistent cookies have one, session-only cookies don't.)
TODO: Throw out any cookies that have expiration dates in the
past?*/
continue;
}