Bug 537630 - crash [@ nsJSScriptTimeoutHandler::SetLateness(unsigned int)], r=smaug

This commit is contained in:
timeless@mozdev.org 2010-04-19 06:32:00 -07:00
parent 1f7521c464
commit cdae723183

View File

@ -323,8 +323,8 @@ void nsJSScriptTimeoutHandler::SetLateness(PRIntervalTime aHowLate)
if (jsarray) {
PRUint32 argc;
jsval *jsargv;
jsarray->GetArgs(&argc, reinterpret_cast<void **>(&jsargv));
if (jsargv && argc)
nsresult rv = jsarray->GetArgs(&argc, reinterpret_cast<void **>(&jsargv));
if (NS_SUCCEEDED(rv) && jsargv && argc)
jsargv[argc-1] = INT_TO_JSVAL((jsint) aHowLate);
} else {
NS_ERROR("How can our argv not handle this?");