Bug 1406197 Declare sized deallocators (that ignore the size) to correct a MinGW warning r?glandium draft
authorTom Ritter <tom@mozilla.com>
Tue, 10 Oct 2017 13:16:10 -0500
changeset 677756 72b358567d6004bf47910344c4102c27d88520e6
parent 677754 73fdc19b45771e2f778b8187dc22ce88368fb087
child 681668 48e55861da9fc73af6d0dd5a1b77b7d1c8064cf0
push id83799
push userbmo:tom@mozilla.com
push dateTue, 10 Oct 2017 18:16:53 +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);
 }
 
 
 /*