1 In house patch, will not send upstream. |
|
2 ERR() function is already defined elsewhere. |
|
3 |
|
4 --- mozilla-esr38/gfx/angle/src/common/debug.h 2015-10-26 15:49:18.755193254 -0700 |
|
5 +++ mozilla-esr38/gfx/angle/src/common/debug.h 2015-10-26 15:48:39.108802848 -0700 |
|
6 @@ -57,9 +57,9 @@ namespace gl |
|
7 |
|
8 // A macro to output a function call and its arguments to the debugging log, in case of error. |
|
9 #if defined(ANGLE_TRACE_ENABLED) |
|
10 -#define ERR(message, ...) gl::trace(false, gl::MESSAGE_ERR, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
|
11 +#define FFERR(message, ...) gl::trace(false, gl::MESSAGE_ERR, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
|
12 #else |
|
13 -#define ERR(message, ...) (void(0)) |
|
14 +#define FFERR(message, ...) (void(0)) |
|
15 #endif |
|
16 |
|
17 // A macro to log a performance event around a scope. |
|
18 @@ -105,7 +105,7 @@ namespace gl |
|
19 #if !defined(NDEBUG) |
|
20 #define ASSERT(expression) { \ |
|
21 if(!(expression)) \ |
|
22 - ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \ |
|
23 + FFERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \ |
|
24 assert(expression); \ |
|
25 } ANGLE_EMPTY_STATEMENT |
|
26 #define UNUSED_ASSERTION_VARIABLE(variable) |
|
27 @@ -144,11 +144,11 @@ namespace gl |
|
28 // A macro for code which is not expected to be reached under valid assumptions |
|
29 #if !defined(NDEBUG) |
|
30 #define UNREACHABLE() { \ |
|
31 - ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \ |
|
32 + FFERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \ |
|
33 assert(false); \ |
|
34 } ANGLE_EMPTY_STATEMENT |
|
35 #else |
|
36 - #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__) |
|
37 + #define UNREACHABLE() FFERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__) |
|
38 #endif |
|
39 |
|
40 #endif // COMMON_DEBUG_H_ |
|