bug 320838: Don't return OK without clearing the pending exception. r+sr=jst

This commit is contained in:
mrbkap%gmail.com 2006-01-06 22:18:46 +00:00
parent b380c285ac
commit 93383ac1ed

View File

@ -6527,8 +6527,9 @@ nsGlobalWindow::ClearTimeoutOrInterval()
if (argv[0] == JSVAL_VOID || !::JS_ValueToInt32(cx, argv[0], &timer_id) ||
timer_id <= 0) {
// Undefined or non-positive number passed as argument, return
// early.
// early. Make sure that JS_ValueToInt32 didn't set an exception.
::JS_ClearPendingException(cx);
return NS_OK;
}