From 5288b89c2a36eb8aef877fc8795dc10c4e072e89 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Wed, 15 Jan 2003 20:37:12 +0000 Subject: [PATCH] #166686 r=dougt, sr=bzbarsky Assert if we try to malloc zero in nsMemory git-svn-id: svn://10.0.0.236/trunk@136370 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/base/nsMemoryImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mozilla/xpcom/base/nsMemoryImpl.cpp b/mozilla/xpcom/base/nsMemoryImpl.cpp index ae0c4aba341..121d2abdb0e 100644 --- a/mozilla/xpcom/base/nsMemoryImpl.cpp +++ b/mozilla/xpcom/base/nsMemoryImpl.cpp @@ -315,6 +315,7 @@ reallocator(void* ptr, PRSize size, PRUint32& counter, PRUint32 max) NS_IMETHODIMP_(void *) nsMemoryImpl::Alloc(PRSize size) { + NS_ASSERTION(size, "nsMemoryImpl::Alloc of 0"); void* result = MALLOC1(size); if (! result) { // Request an asynchronous flush