mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-28 03:06:20 -04:00
[spidermonkey] allow timeout == 0 for setTimeout
This commit is contained in:
parent
761752239f
commit
17eaef0688
@ -639,12 +639,17 @@ window_setTimeout(JSContext *ctx, unsigned int argc, JS::Value *rval)
|
||||
char *code;
|
||||
int timeout;
|
||||
|
||||
if (argc != 2)
|
||||
if (argc < 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
timeout = args[1].toInt32();
|
||||
if (argc > 1) {
|
||||
timeout = args[1].toInt32();
|
||||
} else {
|
||||
timeout = 0;
|
||||
}
|
||||
|
||||
if (timeout <= 0) {
|
||||
if (timeout < 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user