Bug 1406197 Declare sized deallocators (that ignore the size) to correct a MinGW warning r=glandium
authorTom Ritter <tom@mozilla.com>
Tue, 10 Oct 2017 13:16:10 -0500
changeset 385586 d346efc8449b1a5f658e1a84203686c8860fc69b
parent 385585 b581fa3d8e7a2b853d171c4dc6ae1ecdf2ad44d3
child 385587 4cce79b99e1397ecf3f66227b74d28d71e3b0b46
push id53088
push userryanvm@gmail.com
push dateWed, 11 Oct 2017 17:21:34 +0000
treeherderautoland@d346efc8449b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1406197
milestone58.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 1406197 Declare sized deallocators (that ignore the size) to correct a MinGW warning r=glandium MozReview-Commit-ID: Dl4uu6evlbs
memory/mozalloc/mozalloc.h
old mode 100644
new mode 100755
--- a/memory/mozalloc/mozalloc.h
+++ b/memory/mozalloc/mozalloc.h
@@ -225,28 +225,44 @@ void* operator new[](size_t size, const 
 }
 
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
 void operator delete(void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS
 {
     return free_impl(ptr);
 }
 
+#if __cplusplus >= 201402L
+MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
+void operator delete(void* ptr, size_t size) MOZALLOC_THROW_IF_HAS_EXCEPTIONS
+{
+    return free_impl(ptr);
+}
+#endif
+
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
 void operator delete(void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS
 {
     return free_impl(ptr);
 }
 
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
 void operator delete[](void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS
 {
     return free_impl(ptr);
 }
 
+#if __cplusplus >= 201402L
+MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
+void operator delete[](void* ptr, size_t size) MOZALLOC_THROW_IF_HAS_EXCEPTIONS
+{
+    return free_impl(ptr);
+}
+#endif
+
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
 void operator delete[](void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS
 {
     return free_impl(ptr);
 }
 
 
 /*