зеркало из https://github.com/mozilla/pjs.git
Bug 662557 - assert on out-of-memory errors in NSS even in release builds, r=kaie
This commit is contained in:
Родитель
41271d1553
Коммит
7ba664e7f8
|
@ -180,6 +180,10 @@ PORT_SetError(int value)
|
|||
#ifdef DEBUG_jp96085
|
||||
PORT_Assert(value != SEC_ERROR_REUSED_ISSUER_AND_SERIAL);
|
||||
#endif
|
||||
if (value == SEC_ERROR_NO_MEMORY &&
|
||||
PR_GetEnv("NSS_DEBUG_SEC_ERROR_NO_MEMORY")) {
|
||||
PR_Assert("SEC_ERROR_NO_MEMORY: attach minidump to bug 662557", __FILE__, __LINE__);
|
||||
}
|
||||
PR_SetError(value, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
# HG changeset patch
|
||||
# Parent d9973f355dc5d8cc8649fe269561478541c79c99
|
||||
# User Brian Smith <bsmith@mozilla.com>
|
||||
diff --git a/security/nss/lib/util/secport.c b/security/nss/lib/util/secport.c
|
||||
--- a/security/nss/lib/util/secport.c
|
||||
+++ b/security/nss/lib/util/secport.c
|
||||
@@ -175,16 +175,20 @@ PORT_Strdup(const char *str)
|
||||
}
|
||||
|
||||
void
|
||||
PORT_SetError(int value)
|
||||
{
|
||||
#ifdef DEBUG_jp96085
|
||||
PORT_Assert(value != SEC_ERROR_REUSED_ISSUER_AND_SERIAL);
|
||||
#endif
|
||||
+ if (value == SEC_ERROR_NO_MEMORY &&
|
||||
+ PR_GetEnv("NSS_DEBUG_SEC_ERROR_NO_MEMORY")) {
|
||||
+ PR_Assert("SEC_ERROR_NO_MEMORY: attach minidump to bug 662557", __FILE__, __LINE__);
|
||||
+ }
|
||||
PR_SetError(value, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
PORT_GetError(void)
|
||||
{
|
||||
return(PR_GetError());
|
Загрузка…
Ссылка в новой задаче