Bug 507587 - Warning: reference to undefined property jscookies[cookie.host]. r=zeniko

This commit is contained in:
Dão Gottwald 2009-07-31 14:39:22 +02:00
parent bf4108370b
commit 33c3327109

View File

@ -1617,14 +1617,9 @@ SessionStoreService.prototype = {
if (cookie.isSession && _this._checkPrivacyLevel(cookie.isSecure)) {
// use the cookie's host, path, and name as keys into a hash,
// to make sure we serialize each cookie only once
var isInHash = false;
try {
if (jscookies[cookie.host][cookie.path][cookie.name])
isInHash = true;
} catch (e) {
// not in hash yet
}
if (!isInHash) {
if (!(cookie.host in jscookies &&
cookie.path in jscookies[cookie.host] &&
cookie.name in jscookies[cookie.host][cookie.path])) {
var jscookie = { "host": cookie.host, "value": cookie.value };
// only add attributes with non-default values (saving a few bits)
if (cookie.path) jscookie.path = cookie.path;