Bug 32918

Summary: setTimeout() & setInterval() should raise an exception if the first argument is not callable
Product: WebKit Reporter: Andrey Kosyakov <caseq>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Trivial    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Andrey Kosyakov
Reported 2009-12-24 09:36:54 PST
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
Note You need to log in before you can comment on or make changes to this bug.