author | Tom Tromey <tom@tromey.com> |
Fri, 09 Dec 2016 10:50:37 -1000 | |
changeset 343550 | c6e12df0792f6c532982860663bb55a122d4f1e6 |
parent 343549 | 11812794175e5614b7025cb7a25fa7037da88890 |
child 343551 | 2e15220e1106db5066dd38402392170ad22053ed |
push id | 31381 |
push user | kwierso@gmail.com |
push date | Fri, 17 Feb 2017 20:45:51 +0000 |
treeherder | mozilla-central@f302def88fe5 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | froydnj |
bugs | 1060419 |
milestone | 54.0a1 |
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
|
--- a/xpcom/base/nsDebug.h +++ b/xpcom/base/nsDebug.h @@ -11,17 +11,18 @@ #include "nsError.h" #include "nsXPCOM.h" #include "mozilla/Assertions.h" #include "mozilla/Likely.h" #include <stdarg.h> #ifdef DEBUG -#include "prprf.h" +#include "mozilla/IntegerPrintfMacros.h" +#include "mozilla/Printf.h" #endif /** * Warn if the given condition is true. The condition is evaluated in both * release and debug builds, and the result is an expression which can be * used in subsequent expressions, such as: * * if (NS_WARN_IF(NS_FAILED(rv)) { @@ -285,26 +286,28 @@ inline void MOZ_PretendNoReturn() /****************************************************************************** ** Macros for checking results ******************************************************************************/ #if defined(DEBUG) && !defined(XPCOM_GLUE_AVOID_NSPR) #define NS_ENSURE_SUCCESS_BODY(res, ret) \ - char *msg = PR_smprintf("NS_ENSURE_SUCCESS(%s, %s) failed with " \ - "result 0x%X", #res, #ret, __rv); \ + char *msg = mozilla::Smprintf("NS_ENSURE_SUCCESS(%s, %s) failed with " \ + "result 0x%" PRIX32, #res, #ret, \ + static_cast<uint32_t>(__rv)); \ NS_WARNING(msg); \ - PR_smprintf_free(msg); + mozilla::SmprintfFree(msg); #define NS_ENSURE_SUCCESS_BODY_VOID(res) \ - char *msg = PR_smprintf("NS_ENSURE_SUCCESS_VOID(%s) failed with " \ - "result 0x%X", #res, __rv); \ + char *msg = mozilla::Smprintf("NS_ENSURE_SUCCESS_VOID(%s) failed with " \ + "result 0x%" PRIX32, #res, \ + static_cast<uint32_t>(__rv)); \ NS_WARNING(msg); \ - PR_smprintf_free(msg); + mozilla::SmprintfFree(msg); #else #define NS_ENSURE_SUCCESS_BODY(res, ret) \ NS_WARNING("NS_ENSURE_SUCCESS(" #res ", " #ret ") failed"); #define NS_ENSURE_SUCCESS_BODY_VOID(res) \ NS_WARNING("NS_ENSURE_SUCCESS_VOID(" #res ") failed");