diff --git a/memory/mozalloc/mozalloc.h b/memory/mozalloc/mozalloc.h index b59b25db17c..8a9d857b35f 100644 --- a/memory/mozalloc/mozalloc.h +++ b/memory/mozalloc/mozalloc.h @@ -214,15 +214,13 @@ MOZALLOC_EXPORT void* moz_valloc(size_t size) * to suppress build warning spam (bug 578546). */ #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS /**/ +#define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS #else #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw() +#define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS throw(std::bad_alloc) #endif -#ifdef MOZ_CPP_EXCEPTIONS -#define MOZALLOC_THROW_BAD_ALLOC throw(std::bad_alloc) -#else -#define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_IF_HAS_EXCEPTIONS -#endif +#define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS MOZALLOC_EXPORT_NEW MOZALLOC_INLINE void* operator new(size_t size) MOZALLOC_THROW_BAD_ALLOC