mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-06 04:35:04 +00:00
bug 320838: Don't return OK without clearing the pending exception. r+sr=jst
This commit is contained in:
parent
b380c285ac
commit
93383ac1ed
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user