mdbOid rowId; nsMdbPtr<nsIMdbRow> row(mEnv); err = mStore->FindRow(mEnv, kToken_HistoryRowScope, kToken_URLColumn, &yarn, &rowId, getter_Acquires(row));  if (err != 0) return NS_ERROR_FAILURE;  if ((err == 0) && (row)) { nsMdbPtr<nsIMdbCell> lastvisitdate(mEnv); err = row->GetCell(mEnv, kToken_LastVisitDateColumn, getter_Acquires(lastvisitdate)); if (err != 0) return NS_ERROR_FAILURE;  lastvisitdate->AliasYarn(mEnv, &yarn);  rv = CharsToPRInt64((const char*) yarn.mYarn_Buf, yarn.mYarn_Fill, _retval); if (NS_FAILED(rv)) return rv; } else { *_retval = LL_ZERO; }
if (NS_FAILED(rv)) return rv; if (!row) return NS_ERROR_FAILURE;  return GetRowValue(row, kToken_LastVisitDateColumn, _retval);
nsGlobalHistory::GetLastVisitDate(const char *aURL, PRInt64 *_retval){  nsresult rv;  mdb_err err;  PRInt32 len = PL_strlen(aURL);  mdbYarn yarn = { (void*) aURL, len, len, 0, 0, nsnull };  mdbOid rowId;  nsMdbPtr<nsIMdbRow> row(mEnv);  err = mStore->FindRow(mEnv, kToken_HistoryRowScope, kToken_URLColumn, &yarn,                        &rowId, getter_Acquires(row));  if (err != 0) return NS_ERROR_FAILURE;  if ((err == 0) && (row)) {    nsMdbPtr<nsIMdbCell> lastvisitdate(mEnv);    err = row->GetCell(mEnv, kToken_LastVisitDateColumn, getter_Acquires(lastvisitdate));    if (err != 0) return NS_ERROR_FAILURE;    lastvisitdate->AliasYarn(mEnv, &yarn);    rv = CharsToPRInt64((const char*) yarn.mYarn_Buf, yarn.mYarn_Fill, _retval);    if (NS_FAILED(rv)) return rv;  }  else {    *_retval = LL_ZERO; // return zero if not found  }  return NS_OK;}