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 578508 170fee4541a332cbe517494793c6061ab0051c02
parent 578507 6028e667129f19ef7f77ad9bf1de55bff77d54f0
child 578509 21a5f7033f60dd7cb63638255a10b07d0f74fe07
push id58943
push userbmo:emilio+bugs@crisal.io
push dateTue, 16 May 2017 04:34:19 +0000
reviewersdimi
bugs1342900
milestone55.0a1
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();