Bug 1447929 - Fix a few interface/concrete smart pointers in Places. r=standard8
MozReview-Commit-ID: IEoPxZseoyw
--- a/toolkit/components/places/SQLFunctions.cpp
+++ b/toolkit/components/places/SQLFunctions.cpp
@@ -571,17 +571,17 @@ namespace places {
const nsNavHistory* history = nsNavHistory::GetConstHistoryService();
NS_ENSURE_STATE(history);
RefPtr<Database> DB = Database::GetDatabase();
NS_ENSURE_STATE(DB);
// Fetch the page stats from the database.
{
- RefPtr<mozIStorageStatement> getPageInfo = DB->GetStatement(
+ nsCOMPtr<mozIStorageStatement> getPageInfo = DB->GetStatement(
"SELECT typed, visit_count, foreign_count, "
"(substr(url, 0, 7) = 'place:') "
"FROM moz_places "
"WHERE id = :page_id "
);
NS_ENSURE_STATE(getPageInfo);
mozStorageStatementScoper infoScoper(getPageInfo);
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -2609,17 +2609,17 @@ nsNavHistory::OnEndVacuum(bool aSucceede
////////////////////////////////////////////////////////////////////////////////
//// nsPIPlacesDatabase
NS_IMETHODIMP
nsNavHistory::GetDBConnection(mozIStorageConnection **_DBConnection)
{
NS_ENSURE_ARG_POINTER(_DBConnection);
- RefPtr<mozIStorageConnection> connection = mDB->MainConn();
+ nsCOMPtr<mozIStorageConnection> connection = mDB->MainConn();
connection.forget(_DBConnection);
return NS_OK;
}
NS_IMETHODIMP
nsNavHistory::GetShutdownClient(nsIAsyncShutdownClient **_shutdownClient)
{