зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
cbc91827ec
Коммит
7dc49c82ec
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче