Bug 32918
Summary: | setTimeout() & setInterval() should raise an exception if the first argument is not callable | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andrey Kosyakov <caseq> |
Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Trivial | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Andrey Kosyakov
setTimeout() & setInterval() fail silently in case first argument is not a function or string. Other implementations (FF, IE) throw an exception.
setTimeout(function(){ alert('a') }, 10); // works as intended
setTimeout(10, function(){ alert('a') }); // makes no sense but no diagnostics provided
FF 3.5.6:
Error: useless setTimeout call (missing quotes around argument?)
IE 8.0:
Message: Invalid argument.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |