Bug 1423461 - Use noexcept in mozalloc.h on android. r=njn

Bug 1163171 removed support for building for android with GCC, and we
don't need to use throw() anymore. We can use the same code as for other
non-Windows platforms.

--HG--
extra : rebase_source : 9c2c2179a6d214096619ff0ae1d1a42912beda79
This commit is contained in:
Mike Hommey 2017-12-06 11:38:59 +09:00
Родитель 41a56e83c2
Коммит a646756fb7
1 изменённых файлов: 1 добавлений и 10 удалений

Просмотреть файл

@ -125,16 +125,7 @@ MOZ_END_EXTERN_C
# define MOZALLOC_EXPORT_NEW
#endif
#if defined(ANDROID)
/*
* It's important to always specify 'throw()' in GCC because it's used to tell
* GCC that 'new' may return null. That makes GCC null-check the result before
* potentially initializing the memory to zero.
* Also, the Android minimalistic headers don't include std::bad_alloc.
*/
#define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw()
#define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
#elif defined(_MSC_VER)
#if defined(_MSC_VER)
/*
* Suppress build warning spam (bug 578546).
*/