Bug 888352: Don't needlessly dereference the return value of AppendElement, in History.cpp. r=mano
☠☠ backed out by 6f996afe0d61 ☠ ☠
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 28 Jun 2013 11:04:14 -0700
changeset 136819 fdf7cf30975093820ea8d8637ab3735906d6998c
parent 136818 0252b45289f5f8bda1b8b099ce16d57ecc381314
child 136820 6f996afe0d610b6ef97949e1610f2d2911c660f9
push id30286
push userdholbert@mozilla.com
push dateFri, 28 Jun 2013 18:04:45 +0000
treeherdermozilla-inbound@fdf7cf309750 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmano
bugs888352
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 888352: Don't needlessly dereference the return value of AppendElement, in History.cpp. r=mano
toolkit/components/places/History.cpp
--- a/toolkit/components/places/History.cpp
+++ b/toolkit/components/places/History.cpp
@@ -2708,17 +2708,17 @@ History::GetPlacesInfo(const JS::Value& 
 
       VisitData& placeInfo = *placesInfo.AppendElement(VisitData());
       placeInfo.guid = guid;
     }
     else {
       nsCOMPtr<nsIURI> uri = GetJSValueAsURI(aCtx, placeIdentifier);
       if (!uri)
         return NS_ERROR_INVALID_ARG; // neither a guid, nor a uri.
-      *placesInfo.AppendElement(VisitData(uri));
+      placesInfo.AppendElement(VisitData(uri));
     }
   }
 
   mozIStorageConnection* dbConn = GetDBConn();
   NS_ENSURE_STATE(dbConn);
 
   for (nsTArray<VisitData>::size_type i = 0; i < placesInfo.Length(); i++) {
     nsresult rv = GetPlaceInfo::Start(dbConn, placesInfo.ElementAt(i), aCallback);