Bug 40057 - IDL bindings should throw TypeError when called with too few arguments
Summary: IDL bindings should throw TypeError when called with too few arguments
Status: RESOLVED DUPLICATE of bug 21257
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 39962
  Show dependency treegraph
 
Reported: 2010-06-02 06:49 PDT by Andreas Kling
Modified: 2010-06-02 10:38 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (224.20 KB, patch)
2010-06-02 06:57 PDT, Andreas Kling
sam: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2010-06-02 06:49:56 PDT
See Web IDL spec, 4.3.5 "Operations":
http://www.w3.org/TR/WebIDL/#es-operations

Essentially, functions should throw a TypeError if called with too few arguments.

This behavior is implemented by Gecko and Opera.
Comment 1 Andreas Kling 2010-06-02 06:57:09 PDT
Created attachment 57649 [details]
Proposed patch

First stab at a patch.
Comment 2 Sam Weinig 2010-06-02 08:22:12 PDT
Comment on attachment 57649 [details]
Proposed patch

We have made a conscious decision not throw for two few arguments and we should a much larger discussion if we want to change that behavior.  It is very likely that this will break a lot of webkit specific code paths on web. r-
Comment 3 Andreas Kling 2010-06-02 08:43:10 PDT
(In reply to comment #2)
> (From update of attachment 57649 [details])
> We have made a conscious decision not throw for two few arguments and we should a much larger discussion if we want to change that behavior.

I see. Where can I find the original discussion about this?
Comment 4 Darin Adler 2010-06-02 10:38:54 PDT

*** This bug has been marked as a duplicate of bug 21257 ***