Bug 40750 - Differences in error reporting for overloaded methods causing fast/canvas/webgl/texImageTest.html to fail
Summary: Differences in error reporting for overloaded methods causing fast/canvas/web...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-16 17:36 PDT by Kenneth Russell
Modified: 2010-06-17 10:41 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.62 KB, patch)
2010-06-16 18:13 PDT, Kenneth Russell
oliver: review+
kbr: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2010-06-16 17:36:28 PDT
The automatic code generation for overloaded methods recently added to CodeGeneratorJS.pm and CodeGeneratorV8.pm differs in its error reporting. CodeGeneratorJS.pm throws a TypeError when none of the overloaded methods match, while CodeGeneratorV8.pm throws a SYNTAX_ERR DOM exception. The Web IDL specification states that TypeError should be thrown; the concept of a syntax error is not even mentioned in the spec.

This difference in behavior is causing fast/canvas/webgl/texImageTest-expected.txt to fail in Chromium. Currently this is the only layout test which exercises the failure case of the autogenerated overloaded method bindings.
Comment 1 Kenneth Russell 2010-06-16 18:13:04 PDT
Created attachment 58948 [details]
Patch

From the ChangeLog:

Added V8Proxy::throwTypeError() and throwSyntaxError for parity with JSC::throwTypeError() and throwSyntaxError. Changed CodeGeneratorV8.pm to use throwTypeError for overload resolution failures. Revised CodeGeneratorJS.pm to use throwVMTypeError instead of manual call to JSValue::encode. Deleted now-unnecessary Chromium expectations for fast/canvas/webgl/texImageTest.html.
Comment 2 Kenneth Russell 2010-06-17 10:41:08 PDT
Committed r61337: <http://trac.webkit.org/changeset/61337>