Make nsCycleCollector::Fault do something in debug builds. b=372320 r=graydon sr=peterv

This commit is contained in:
dbaron%dbaron.org 2007-03-05 21:07:51 +00:00
parent 526d3e2011
commit 3d3dda25c0

View File

@ -134,6 +134,7 @@
#include "prprf.h"
#include "plstr.h"
#include "prtime.h"
#include "nsPrintfCString.h"
#include <stdio.h>
#ifdef WIN32
@ -591,6 +592,10 @@ Fault(const char *msg, const void *ptr=nsnull)
}
NS_NOTREACHED(nsPrintfCString(256,
"Fault in cycle collector: %s (ptr: %p)\n",
msg, ptr).get());
// When faults are not fatal, we assume we're running in a
// production environment and we therefore want to disable the
// collector on a fault. This will unfortunately cause the browser
@ -1396,7 +1401,7 @@ nsCycleCollector::RegisterRuntime(PRUint32 langID,
Fault("unknown language runtime in registration");
if (mRuntimes[langID])
Fault("multiple registrations of langauge runtime", rt);
Fault("multiple registrations of language runtime", rt);
mRuntimes[langID] = rt;
}