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

This commit is contained in:
jruderman%hmc.edu 2004-08-30 20:50:24 +00:00
parent 75440643b7
commit 9ddb229d93

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