mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 1060419 - make xpcom/glue/nsDebug.h use Printf.h, r=froydnj
MozReview-Commit-ID: 3nau1fJbnuX --HG-- extra : rebase_source : fee266790c1842818c8332c31e30fbee0ea3feb1
This commit is contained in:
parent
3fc18f2e33
commit
dbba99687c
@ -16,7 +16,8 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
#include "prprf.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
#include "mozilla/Printf.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -290,16 +291,18 @@ inline void MOZ_PretendNoReturn()
|
||||
#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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user