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
This commit is contained in:
mkaply%us.ibm.com
2003-01-15 20:37:12 +00:00
parent 30a9b1db1c
commit 5288b89c2a

View File

@@ -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