Bug 578546 - Fix MSVC warning spam by adjusting ifdef to include MSVC. r=cjones a=benjamin
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 16 Nov 2010 10:19:23 +0100
changeset 57570 539b6dd6ded6fb9712536622a92a1bc4058dd9f6
parent 57569 b0ef3f1aabb2a7340ee845d8b6411430674da73f
child 57571 a42e9b001bc86834134c57d15f519a3b67eb8fcf
push id16985
push userdgottwald@mozilla.com
push dateTue, 16 Nov 2010 09:22:31 +0000
treeherdermozilla-central@a42e9b001bc8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones, benjamin
bugs578546
milestone2.0b8pre
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 578546 - Fix MSVC warning spam by adjusting ifdef to include MSVC. r=cjones a=benjamin
memory/mozalloc/mozalloc.h
--- a/memory/mozalloc/mozalloc.h
+++ b/memory/mozalloc/mozalloc.h
@@ -201,20 +201,21 @@ MOZALLOC_EXPORT void* moz_valloc(size_t 
  * visibility on OS X/gcc. These symbols are force-inline and not
  * exported. */
 #if defined(XP_MACOSX)
 #  define MOZALLOC_EXPORT_NEW MOZALLOC_EXPORT
 #else
 #  define MOZALLOC_EXPORT_NEW
 #endif
 
-#ifdef ANDROID
+#if defined(ANDROID) || defined(_MSC_VER)
 /*
  * Android doesn't fully support exceptions, so its <new> header
- * has operators that don't specify throw() at all.
+ * has operators that don't specify throw() at all. Also include MSVC
+ * to suppress build warning spam (bug 578546).
  */
 #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS /**/
 #else
 #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw()
 #endif
 
 #ifdef MOZ_CPP_EXCEPTIONS
 #define MOZALLOC_THROW_BAD_ALLOC throw(std::bad_alloc)