Bug 1342900 - Remove usage of nsTArray<nsAutoPtr<>> in Classifier. r=dimi
authorChung-Sheng Fu <cfu@mozilla.com>
Fri, 05 May 2017 14:33:18 +0800
changeset 358510 170fee4541a332cbe517494793c6061ab0051c02
parent 358509 6028e667129f19ef7f77ad9bf1de55bff77d54f0
child 358511 21a5f7033f60dd7cb63638255a10b07d0f74fe07
push id31827
push usercbook@mozilla.com
push dateTue, 16 May 2017 10:34:19 +0000
treeherdermozilla-central@49365d675cbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdimi
bugs1342900
milestone55.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 1342900 - Remove usage of nsTArray<nsAutoPtr<>> in Classifier. r=dimi MozReview-Commit-ID: 2SGPEuEg0lz
toolkit/components/url-classifier/Classifier.cpp
--- a/toolkit/components/url-classifier/Classifier.cpp
+++ b/toolkit/components/url-classifier/Classifier.cpp
@@ -17,16 +17,17 @@
 #include "nsThreadUtils.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/Logging.h"
 #include "mozilla/SyncRunnable.h"
 #include "mozilla/Base64.h"
 #include "mozilla/Unused.h"
 #include "mozilla/SizePrintfMacros.h"
+#include "mozilla/UniquePtr.h"
 #include "nsIUrlClassifierUtils.h"
 #include "nsUrlClassifierDBService.h"
 
 // MOZ_LOG=UrlClassifierDbService:5
 extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
 #define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
 #define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
 
@@ -57,17 +58,17 @@ public:
 
   ~ScopedUpdatesClearer()
   {
     mUpdatesArrayRef->Clear();
   }
 
 private:
   nsTArray<TableUpdate*>* mUpdatesArrayRef;
-  nsTArray<nsAutoPtr<TableUpdate>> mUpdatesPointerHolder;
+  nsTArray<UniquePtr<TableUpdate>> mUpdatesPointerHolder;
 };
 
 } // End of unnamed namespace.
 
 void
 Classifier::SplitTables(const nsACString& str, nsTArray<nsCString>& tables)
 {
   tables.Clear();