256757 - misused printf causes crash [@ nsXPCWrappedJSClass::CheckForException]. r=sr=jst.

git-svn-id: svn://10.0.0.236/trunk@161499 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jruderman%hmc.edu 2004-08-30 20:50:24 +00:00
parent 485a2e546d
commit 9c0099859c

View File

@ -848,18 +848,18 @@ nsXPCWrappedJSClass::CheckForException(XPCCallContext & ccx,
static const char cant_get_text[] =
"FAILED TO GET TEXT FROM EXCEPTION\n";
printf(line);
printf(preamble);
fputs(line, stdout);
fputs(preamble, stdout);
char* text;
if(NS_SUCCEEDED(xpc_exception->ToString(&text)) && text)
{
printf(text);
printf("\n");
fputs(text, stdout);
fputs("\n", stdout);
nsMemory::Free(text);
}
else
printf(cant_get_text);
printf(line);
fputs(cant_get_text, stdout);
fputs(line, stdout);
#endif
// Log the exception to the JS Console, so that users can do