mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Bug 1423512 - Remove infallible allocator exception for xpcom glue code. r=erahm
Back when mozalloc was a separate library, the xpcom glue code could not use the infallible allocator API. But since bug 868814, that's not the case anymore, so we can safely include mozalloc.h when XPCOM_GLUE is set. --HG-- extra : rebase_source : a8fbf8dc7020765d7287e2eb7ceaf41c99be8b18
This commit is contained in:
parent
c6b6415a7b
commit
f0c6dabd84
@ -45,10 +45,8 @@
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
|
||||
// See if we're in code that can use mozalloc. NB: this duplicates
|
||||
// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
|
||||
// can't build with that being included before base/basictypes.h.
|
||||
# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
|
||||
// See if we're in code that can use mozalloc.
|
||||
# if !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
|
||||
# include "mozilla/mozalloc.h"
|
||||
# else
|
||||
# error "STL code can only be used with infallible ::operator new()"
|
||||
|
@ -62,10 +62,8 @@
|
||||
#pragma warning( pop )
|
||||
|
||||
#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
|
||||
// See if we're in code that can use mozalloc. NB: this duplicates
|
||||
// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
|
||||
// can't build with that being included before base/basictypes.h.
|
||||
# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
|
||||
// See if we're in code that can use mozalloc.
|
||||
# if !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
|
||||
# include "mozilla/mozalloc.h"
|
||||
# else
|
||||
# error "STL code can only be used with infallible ::operator new()"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#endif
|
||||
|
||||
/* Definitions of functions and operators that allocate memory. */
|
||||
#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
|
||||
#if !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
|
||||
# include "mozilla/mozalloc.h"
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user