mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 916568 - Remove xpcom/base/nsErrorAsserts.cpp; r=ehsan
This commit is contained in:
parent
fd18d7f13c
commit
29f6c717cd
@ -91,7 +91,6 @@ CPP_SOURCES += [
|
||||
'nsConsoleService.cpp',
|
||||
'nsCycleCollector.cpp',
|
||||
'nsDebugImpl.cpp',
|
||||
'nsErrorAsserts.cpp',
|
||||
'nsErrorService.cpp',
|
||||
'nsGZFileWriter.cpp',
|
||||
'nsInterfaceRequestorAgg.cpp',
|
||||
|
@ -181,6 +181,12 @@ inline uint32_t NS_FAILED_impl(nsresult _nsresult) {
|
||||
}
|
||||
#define NS_FAILED(_nsresult) ((bool)MOZ_UNLIKELY(NS_FAILED_impl(_nsresult)))
|
||||
#define NS_SUCCEEDED(_nsresult) ((bool)MOZ_LIKELY(!NS_FAILED_impl(_nsresult)))
|
||||
|
||||
/* Check that our enum type is actually uint32_t as expected */
|
||||
static_assert(((nsresult)0) < ((nsresult)-1),
|
||||
"nsresult must be an unsigned type");
|
||||
static_assert(sizeof(nsresult) == sizeof(uint32_t),
|
||||
"nsresult must be 32 bits");
|
||||
#else
|
||||
#define NS_FAILED_impl(_nsresult) ((_nsresult) & 0x80000000)
|
||||
#define NS_FAILED(_nsresult) (MOZ_UNLIKELY(NS_FAILED_impl(_nsresult)))
|
||||
|
@ -1,10 +0,0 @@
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
#include "nsError.h"
|
||||
|
||||
// No reason to pull in Assertions.h for every single file that includes
|
||||
// nsError.h, so let's put this in its own .cpp file instead of in the .h.
|
||||
static_assert(((nsresult)0) < ((nsresult)-1),
|
||||
"nsresult must be an unsigned type");
|
||||
static_assert(sizeof(nsresult) == sizeof(uint32_t),
|
||||
"nsresult must be 32 bits");
|
Loading…
Reference in New Issue
Block a user