goto session_cookie;
return PR_TRUE;
cookie_GetExpiry(const nsAFlatCString &maxageAttribute,                 const nsAFlatCString &expiresAttribute,                 nsInt64              serverTime,                 nsInt64              &expiryTime,                 nsInt64              currentTime,                 nsCookieStatus       aStatus){  /* Determine when the cookie should expire. This is done by taking the difference between    * the server time and the time the server wants the cookie to expire, and adding that    * difference to the client time. This localizes the client time regardless of whether or   * not the TZ environment variable was set on the client.   *   * Note: We need to consider accounting for network lag here, per RFC.   */  nsInt64 delta;  // check for max-age attribute first; this overrides expires attribute  if (!maxageAttribute.IsEmpty()) {    // obtain numeric value of maxageAttribute    PRInt64 maxage;    PRInt32 numInts = PR_sscanf(maxageAttribute.get(), "%lld", &maxage);    // default to session cookie if the conversion failed    if (numInts != 1) {      goto session_cookie;    }    delta = nsInt64(maxage);  // check for expires attribute  } else if (!expiresAttribute.IsEmpty()) {    nsInt64 expires;    PRTime tempExpires;    // parse expiry time    if (PR_ParseTimeString(expiresAttribute.get(), PR_TRUE, &tempExpires) == PR_SUCCESS) {      expires = nsInt64(tempExpires) / USEC_PER_SEC;    } else {      goto session_cookie;    }    delta = expires - serverTime;  // default to session cookie if no attributes found  } else {    goto session_cookie;  }  if (delta <= nsInt64(0)) {    goto expire_cookie;  }  // check cookie lifetime pref, and limit lifetime if required  if (gCookiePrefObserver->mCookiesLifetimeEnabled) {    if (gCookiePrefObserver->mCookiesLifetimeCurrentSession) {      // limit lifetime to session      goto session_cookie;    } else if (delta > nsInt64(gCookiePrefObserver->mCookiesLifetimeSec)) {      // limit lifetime to specified time      delta = gCookiePrefObserver->mCookiesLifetimeSec;    }  }  // if overflow, set to session cookie... not ideal, but it'll work.  expiryTime = currentTime + delta;  if (expiryTime < currentTime) {    goto session_cookie;  }  // default case (proper expiry time).  // the cookie may have been previously downgraded by p3p prefs,  // so we take that into account here.  return (aStatus == nsICookie::STATUS_DOWNGRADED);  session_cookie:    return PR_TRUE;  expire_cookie:    // make sure the cookie is marked appropriately, for expiry.    // we can't just return now, because we might need to delete a previous cookie    expiryTime = currentTime - nsInt64(1);    return PR_FALSE;}