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 679117 d346efc8449b1a5f658e1a84203686c8860fc69b
parent 679116 b581fa3d8e7a2b853d171c4dc6ae1ecdf2ad44d3
child 679118 4cce79b99e1397ecf3f66227b74d28d71e3b0b46
push id84141
push userbmo:schien@mozilla.com
push dateThu, 12 Oct 2017 11:13:04 +0000
reviewersglandium
bugs1406197
milestone58.0a1
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);
 }
 
 
 /*