Bug 66045

Summary: The code generators behave differently for overloaded and non-overloaded functions
Product: WebKit Reporter: Tommy Widenflycht <tommyw>
Component: DOMAssignee: Tommy Widenflycht <tommyw>
Status: RESOLVED LATER    
Severity: Normal CC: abarth, dglazkov, donggwan.kim, harald, pnormand, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 56459, 65925    
Attachments:
Description Flags
Patch abarth: review-, webkit.review.bot: commit-queue-

Tommy Widenflycht
Reported 2011-08-11 04:08:31 PDT
Make the code generator for overloaded functions to behave more like non-overloaded functions regarding missing parameters. If one has just this in the IDL: TYPE function(in TYPE1 arg1) the generated code throws a specialized type error "Not enough parameters" if one calls function without any parameters. If one has this in the IDL: TYPE function(in TYPE1 arg) TYPE function(in TYPE2 arg) and calls function without any parameters the generated code throws just a generic TypeError. This patch counts the number of mandatory parameters for each overloaded function and if the number of arguments is less than the smallest of them throws the specialized type error, otherwise the generic.
Attachments
Patch (7.26 KB, patch)
2011-08-11 04:48 PDT, Tommy Widenflycht
abarth: review-
webkit.review.bot: commit-queue-
Tommy Widenflycht
Comment 1 2011-08-11 04:48:18 PDT
WebKit Review Bot
Comment 2 2011-08-11 05:25:27 PDT
Comment on attachment 103600 [details] Patch Attachment 103600 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9352159 New failing tests: fast/canvas/canvas-overloads-setFillColor.html fast/canvas/canvas-overloads-setStrokeColor.html fast/canvas/canvas-overloads-setShadow.html fast/canvas/canvas-overloads-drawImage.html fast/canvas/webgl/texImageTest.html
Adam Barth
Comment 3 2011-08-11 09:53:11 PDT
Comment on attachment 103600 [details] Patch Looks like landing this patch would cause test failures. It looks like a good approach, however.
Tommy Widenflycht
Comment 4 2011-08-22 03:51:41 PDT
Do you think I should go ahead with this patch, even though it breaks several tests? (Of course I will fix the tests).
Adam Barth
Comment 5 2011-08-22 10:24:46 PDT
We need to look at how our behavior is changing on those tests and decide whether the new behavior is better or worse than the old behavior. For example, is our new behavior more or less consistent with the specifications and other browsers? Is the change likely to cause compatibility problems?
Philippe Normand
Comment 6 2011-09-20 04:50:29 PDT
I skipped fast/files/create-blob-url-crash.html on GTK in http://trac.webkit.org/changeset/95528. It'd be great if the test could be unskipped when this bug is fixed.
Philippe Normand
Comment 7 2011-10-19 04:59:20 PDT
(In reply to comment #6) > I skipped fast/files/create-blob-url-crash.html on GTK in http://trac.webkit.org/changeset/95528. It'd be great if the test could be unskipped when this bug is fixed. fast/files/url-required-arguments.html is also affected by this issue... Skipping in GTK like the test above.
Note You need to log in before you can comment on or make changes to this bug.