mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05: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;
|
char *code;
|
||||||
int timeout;
|
int timeout;
|
||||||
|
|
||||||
if (argc != 2)
|
if (argc < 1) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
timeout = args[1].toInt32();
|
if (argc > 1) {
|
||||||
|
timeout = args[1].toInt32();
|
||||||
|
} else {
|
||||||
|
timeout = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (timeout <= 0) {
|
if (timeout < 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user