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.
Created attachment 103600 [details] Patch
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
Comment on attachment 103600 [details] Patch Looks like landing this patch would cause test failures. It looks like a good approach, however.
Do you think I should go ahead with this patch, even though it breaks several tests? (Of course I will fix the tests).
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?
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.
(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.