Bug 599978 - Part 3: Asynchronous isVisited checks should use a read-only cloned connection

Finalize the statement so we do not crash in debug builds.
r=orange
This commit is contained in:
Shawn Wilsher 2010-10-13 12:02:22 -07:00
Родитель fca3e1ad34
Коммит b3e339ced4
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -1037,7 +1037,11 @@ History::Shutdown()
dont_AddRef(static_cast<Step*>(mPendingVisits.PopFront()));
}
// Clean up our statements and connection.
if (mReadOnlyDBConn) {
if (mIsVisitedStatement) {
(void)mIsVisitedStatement->Finalize();
}
(void)mReadOnlyDBConn->AsyncClose(nsnull);
}
}

Просмотреть файл

@ -123,7 +123,7 @@ private:
/**
* An asynchronous statement to query if a URI is visited or not.
*
* @note this should only be accessed by GetIsVisistedStatement.
* @note this should only be accessed by GetIsVisistedStatement and Shutdown.
*/
nsCOMPtr<mozIStorageAsyncStatement> mIsVisitedStatement;