Bug 63011

Summary: IDL generator should throw TypeError instead of SyntaxError on not enough arguments
Product: WebKit Reporter: Mark Pilgrim (Google) <pilgrim>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, fishd, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 63036, 63151    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ec2-cq-02
none
Patch
abarth: review+, webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cq-01 none

Description Mark Pilgrim (Google) 2011-06-20 14:06:21 PDT
As per http://krijnhoetmer.nl/irc-logs/whatwg/20110618#l-269 , WebIDL mandates that we throw TypeError when a function is called with too few required arguments. WebKit currently throws SyntaxError. This patch rectifies that, as well as fixing the ~20 tests that rely on the old behavior.

NOTE: there are 2 image-based SVG LayoutTests that need rebaselining after this patch lands. This patch does not change visible behavior of SVG; the images just happened to capture the unrelated text "SyntaxError: not enough arguments" (which is now "TypeError: not enough arguments"). The tests in question are

svg/dom/SVGNumberList-basics.xhtml
svg/dom/SVGStringList-basics.xhtml
Comment 1 Mark Pilgrim (Google) 2011-06-20 14:12:16 PDT
Created attachment 97856 [details]
Patch
Comment 2 Adam Barth 2011-06-20 14:22:38 PDT
We should coordinate landing with the gardner due to the image rebaselines.  Maybe ping the gardener on #webkit?
Comment 3 WebKit Review Bot 2011-06-20 14:58:40 PDT
Comment on attachment 97856 [details]
Patch

Rejecting attachment 97856 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-02', '--port..." exit_code: 2

Last 500 characters of output:
ges found.
Detecting changes in WebDOMTestObj.cpp...
No changes found.
Testing the CPP generator on TestInterface.idl
Detecting changes in WebDOMTestInterface.cpp...
No changes found.
Detecting changes in WebDOMTestInterface.h...
No changes found.
Testing the CPP generator on TestCallback.idl
Detecting changes in WebDOMTestCallback.h...
No changes found.
Detecting changes in WebDOMTestCallback.cpp...
No changes found.
(To update the reference files, execute "run-bindings-tests --reset-results")

Full output: http://queues.webkit.org/results/8909670
Comment 4 WebKit Review Bot 2011-06-20 14:58:45 PDT
Created attachment 97863 [details]
Archive of layout-test-results from ec2-cq-02

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: ec2-cq-02  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 5 Adam Barth 2011-06-20 15:02:13 PDT
Caught by the run-bindings-tests!
Comment 6 Mark Pilgrim (Google) 2011-06-20 15:24:56 PDT
Created attachment 97868 [details]
Patch
Comment 7 WebKit Review Bot 2011-06-20 16:47:32 PDT
Comment on attachment 97868 [details]
Patch

Rejecting attachment 97868 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-01', '--port..." exit_code: 2

Last 500 characters of output:
ace.cpp...
No changes found.
Testing the CPP generator on TestMediaQueryListListener.idl
Detecting changes in WebDOMTestMediaQueryListListener.h...
No changes found.
Detecting changes in WebDOMTestMediaQueryListListener.cpp...
No changes found.
Testing the CPP generator on TestInterface.idl
Detecting changes in WebDOMTestInterface.cpp...
No changes found.
Detecting changes in WebDOMTestInterface.h...
No changes found.
(To update the reference files, execute "run-bindings-tests --reset-results")

Full output: http://queues.webkit.org/results/8909717
Comment 8 WebKit Review Bot 2011-06-20 16:47:37 PDT
Created attachment 97888 [details]
Archive of layout-test-results from ec2-cq-01

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: ec2-cq-01  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 9 Adam Barth 2011-06-20 16:48:56 PDT
I'll land this patch for you.
Comment 10 Adam Barth 2011-06-20 16:54:12 PDT
Committed r89315: <http://trac.webkit.org/changeset/89315>