if (mStore) {  nsMdbPtr<nsIMdbThumb> thumb(mEnv); err = mStore->SessionCommit(mEnv, getter_Acquires(thumb)); if (err == 0) { mdb_count total; mdb_count current; mdb_bool done; mdb_bool broken;  do { err = thumb->DoMore(mEnv, &total, &current, &done, &broken); } while ((err == 0) && !broken && !done); }
if (mStore)
nsGlobalHistory::CloseDB(){  mdb_err err;  if (mTable)    mTable->CutStrongRef(mEnv);  if (mStore) {    // Commit all changes here.    nsMdbPtr<nsIMdbThumb> thumb(mEnv);    err = mStore->SessionCommit(mEnv, getter_Acquires(thumb));    if (err == 0) {      mdb_count total;      mdb_count current;      mdb_bool done;      mdb_bool broken;      do {        err = thumb->DoMore(mEnv, &total, &current, &done, &broken);      } while ((err == 0) && !broken && !done);    }    mStore->CutStrongRef(mEnv);  }  if (mEnv)    mEnv->CutStrongRef(mEnv /* XXX */);  return NS_OK;}