Bug 1531027 - Make InfallibleAllocPolicy::new_ accept its argument as a reference; r=njn
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 28 Feb 2019 06:41:09 +0000
changeset 519612 738bde54c69ca1fc4a1e7d194a245915e3a83850
parent 519611 fdd37ef2117ba74c8eb64eaaaa8e9d4d59bce0f7
child 519613 db533ea3d56186d28d701cfa957ba95f5d3421e0
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1531027
milestone67.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 1531027 - Make InfallibleAllocPolicy::new_ accept its argument as a reference; r=njn Differential Revision: https://phabricator.services.mozilla.com/D21486
memory/replace/dmd/DMD.cpp
--- a/memory/replace/dmd/DMD.cpp
+++ b/memory/replace/dmd/DMD.cpp
@@ -178,17 +178,17 @@ class InfallibleAllocPolicy {
 
   template <class T>
   static T* new_() {
     void* mem = malloc_(sizeof(T));
     return new (mem) T;
   }
 
   template <class T, typename P1>
-  static T* new_(P1 aP1) {
+  static T* new_(const P1& aP1) {
     void* mem = malloc_(sizeof(T));
     return new (mem) T(aP1);
   }
 
   template <class T>
   static void delete_(T* aPtr) {
     if (aPtr) {
       aPtr->~T();