err = mStore->FindRow(mEnv, kToken_HistoryRowScope, kToken_URLColumn, &yarn, &rowId, getter_Acquires(row));  if (err != 0) return NS_ERROR_FAILURE;  if (! row) return NS_ERROR_UNEXPECTED;
rv = FindRow(kToken_URLColumn, aURL, getter_Acquires(row)); if (NS_FAILED(rv) || !row) return NS_ERROR_UNEXPECTED;
nsGlobalHistory::SetPageTitle(const char *aURL, const PRUnichar *aTitle){  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 (! row)    return NS_ERROR_UNEXPECTED; // we haven't seen this page yet  // Get the old title so we can notify observers  nsMdbPtr<nsIMdbCell> cell(mEnv);  err = row->GetCell(mEnv, kToken_NameColumn, getter_Acquires(cell));  if (err != 0) return NS_ERROR_FAILURE;  nsresult rv;  nsCOMPtr<nsIRDFLiteral> oldname;  if (cell) {    cell->AliasYarn(mEnv, &yarn);    nsAutoString str((const PRUnichar*) yarn.mYarn_Buf, eTwoByte, (yarn.mYarn_Fill / sizeof(PRUnichar)));    rv = gRDFService->GetLiteral(str.GetUnicode(), getter_AddRefs(oldname));    if (NS_FAILED(rv)) return rv;  }  // Now poke in the new title  yarn.mYarn_Buf = (void*) aTitle;  yarn.mYarn_Fill = yarn.mYarn_Size = (nsCRT::strlen(aTitle) * sizeof(PRUnichar));  err = row->AddColumn(mEnv, kToken_NameColumn, &yarn);  if (err != 0) return NS_ERROR_FAILURE;  // ...and update observers  nsCOMPtr<nsIRDFResource> url;  rv = gRDFService->GetResource(aURL, getter_AddRefs(url));  if (NS_FAILED(rv)) return rv;  nsCOMPtr<nsIRDFLiteral> name;  rv = gRDFService->GetLiteral(aTitle, getter_AddRefs(name));  if (NS_FAILED(rv)) return rv;  if (oldname) {    rv = NotifyChange(url, kNC_Name, oldname, name);  }  else {    rv = NotifyAssert(url, kNC_Name, name);  }  return rv;}