From b3e339ced4d3eecc23f24abd16ed47d5b200fd7a Mon Sep 17 00:00:00 2001 From: Shawn Wilsher Date: Wed, 13 Oct 2010 12:02:22 -0700 Subject: [PATCH] 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 --- toolkit/components/places/src/History.cpp | 4 ++++ toolkit/components/places/src/History.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/toolkit/components/places/src/History.cpp b/toolkit/components/places/src/History.cpp index 9268e7318fa0..1f4276198f03 100644 --- a/toolkit/components/places/src/History.cpp +++ b/toolkit/components/places/src/History.cpp @@ -1037,7 +1037,11 @@ History::Shutdown() dont_AddRef(static_cast(mPendingVisits.PopFront())); } + // Clean up our statements and connection. if (mReadOnlyDBConn) { + if (mIsVisitedStatement) { + (void)mIsVisitedStatement->Finalize(); + } (void)mReadOnlyDBConn->AsyncClose(nsnull); } } diff --git a/toolkit/components/places/src/History.h b/toolkit/components/places/src/History.h index 156ae4c1fdf2..1d40e9acf160 100644 --- a/toolkit/components/places/src/History.h +++ b/toolkit/components/places/src/History.h @@ -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 mIsVisitedStatement;