diff --git a/dom/base/nsJSTimeoutHandler.cpp b/dom/base/nsJSTimeoutHandler.cpp index 7e7142dcb286..37e1833496d2 100644 --- a/dom/base/nsJSTimeoutHandler.cpp +++ b/dom/base/nsJSTimeoutHandler.cpp @@ -323,8 +323,8 @@ void nsJSScriptTimeoutHandler::SetLateness(PRIntervalTime aHowLate) if (jsarray) { PRUint32 argc; jsval *jsargv; - jsarray->GetArgs(&argc, reinterpret_cast(&jsargv)); - if (jsargv && argc) + nsresult rv = jsarray->GetArgs(&argc, reinterpret_cast(&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?");