Bug 1281499 - Add missing include and namespace for MakeUnique<> r=mstange
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Wed, 22 Jun 2016 17:38:40 +0200
changeset 302363 65542739603b47543b728b90f6625ce37cab0b78
parent 302362 b5255021899d7b588c226a4a155b4b838e5ef822
child 302364 c2866818dd8e767a7d6ab4813a640ced59313215
push id30360
push usercbook@mozilla.com
push dateThu, 23 Jun 2016 12:57:36 +0000
treeherdermozilla-central@d1102663db10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1281499
milestone50.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 1281499 - Add missing include and namespace for MakeUnique<> r=mstange MozReview-Commit-ID: DpBZrnx47g8
widget/nsTransferable.cpp
--- a/widget/nsTransferable.cpp
+++ b/widget/nsTransferable.cpp
@@ -31,16 +31,17 @@ Notes to self:
 #include "nsCRT.h" 
 #include "nsNetUtil.h"
 #include "nsIDOMNode.h"
 #include "nsIOutputStream.h"
 #include "nsIInputStream.h"
 #include "nsIWeakReferenceUtils.h"
 #include "nsIFile.h"
 #include "nsILoadContext.h"
+#include "mozilla/UniquePtr.h"
 
 NS_IMPL_ISUPPORTS(nsTransferable, nsITransferable)
 
 size_t GetDataForFlavor (const nsTArray<DataStruct>& aArray,
                            const char* aDataFlavor)
 {
   for (size_t i = 0 ; i < aArray.Length () ; ++i) {
     if (aArray[i].GetFlavor().Equals (aDataFlavor))
@@ -178,17 +179,17 @@ DataStruct::ReadCache(nsISupports** aDat
     int64_t fileSize;
     int64_t max32 = 0xFFFFFFFF;
     cacheFile->GetFileSize(&fileSize);
     if (fileSize > max32)
       return NS_ERROR_OUT_OF_MEMORY;
 
     uint32_t size = uint32_t(fileSize);
     // create new memory for the large clipboard data
-    auto data = MakeUnique<char[]>(size);
+    auto data = mozilla::MakeUnique<char[]>(size);
     if ( !data )
       return NS_ERROR_OUT_OF_MEMORY;
       
     // now read it all in
     nsCOMPtr<nsIInputStream> inStr;
     NS_NewLocalFileInputStream( getter_AddRefs(inStr),
                                 cacheFile);