mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
fix assert-on-exit as well as a crash when switching profiles
sr=darin, r=dmose
This commit is contained in:
parent
f54ac9de78
commit
b04c1c9d1c
@ -2397,12 +2397,12 @@ nsGlobalHistory::CreateTokens()
|
||||
|
||||
nsresult nsGlobalHistory::Commit(eCommitType commitType)
|
||||
{
|
||||
if (!mStore || !mTable)
|
||||
return NS_OK;
|
||||
|
||||
nsresult err = NS_OK;
|
||||
nsMdbPtr<nsIMdbThumb> thumb(mEnv);
|
||||
|
||||
if (!mStore || !mTable)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
if (commitType == kLargeCommit || commitType == kSessionCommit)
|
||||
{
|
||||
mdb_percent outActualWaste = 0;
|
||||
@ -2507,6 +2507,8 @@ nsGlobalHistory::CloseDB()
|
||||
if (mEnv)
|
||||
mEnv->CloseMdbObject(mEnv /* XXX */);
|
||||
|
||||
mTable = mEnv = mStore = nsnull;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user