Bug 1447929 - Fix a few interface/concrete smart pointers in Places. r=standard8 draft
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 22 Mar 2018 11:17:58 +0100
changeset 770997 9f4e25a2174b4b179bb45807da4263ca225970bf
parent 770872 d3e123271879d08c639db7b7be432bbc887aec2d
push id103551
push usermak77@bonardo.net
push dateThu, 22 Mar 2018 10:19:05 +0000
reviewersstandard8
bugs1447929
milestone61.0a1
Bug 1447929 - Fix a few interface/concrete smart pointers in Places. r=standard8 MozReview-Commit-ID: IEoPxZseoyw
toolkit/components/places/SQLFunctions.cpp
toolkit/components/places/nsNavHistory.cpp
--- 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)
 {