| Index: nss/lib/util/secport.h
|
| diff --git a/nss/lib/util/secport.h b/nss/lib/util/secport.h
|
| index f01eb74c7b2db00757f8eaf439d6f0a808af5178..95c73c8d5a1e3e11d83c197e1b5ca5a420bc6cda 100644
|
| --- a/nss/lib/util/secport.h
|
| +++ b/nss/lib/util/secport.h
|
| @@ -87,6 +87,19 @@ extern char *PORT_ArenaStrdup(PLArenaPool *arena, const char *str);
|
| SEC_END_PROTOS
|
|
|
| #define PORT_Assert PR_ASSERT
|
| +/* This runs a function that should return SECSuccess.
|
| + * Intended for NSS internal use only.
|
| + * The return value is asserted in a debug build, otherwise it is ignored.
|
| + * This is no substitute for proper error handling. It is OK only if you
|
| + * have ensured that the function cannot fail by other means such as checking
|
| + * prerequisites. In that case this can be used as a safeguard against
|
| + * unexpected changes in a function.
|
| + */
|
| +#ifdef DEBUG
|
| +#define PORT_CheckSuccess(f) PR_ASSERT((f) == SECSuccess)
|
| +#else
|
| +#define PORT_CheckSuccess(f) (f)
|
| +#endif
|
| #define PORT_ZNew(type) (type*)PORT_ZAlloc(sizeof(type))
|
| #define PORT_New(type) (type*)PORT_Alloc(sizeof(type))
|
| #define PORT_ArenaNew(poolp, type) \
|
|
|