RESOLVED FIXED 101502
Wrong error type is thrown for type errors in callbacks
https://bugs.webkit.org/show_bug.cgi?id=101502
Summary Wrong error type is thrown for type errors in callbacks
Erik Arvidsson
Reported 2012-11-07 12:42:30 PST
"4.2.21. Callback function types IDL callback function types are represented by ECMAScript Function objects. An ECMAScript value V is converted to an IDL callback function type value by running the following algorithm: If V is not a Function object, then throw a TypeError. Return the IDL callback function type value that represents a reference to that Function object. The result of converting an IDL callback function type value to an ECMAScript value is a reference to the same object that the IDL callback function type value represents." We throw a TYPE_MISMATCH_ERR DOMException instead.
Attachments
Patch (18.54 KB, patch)
2012-11-08 07:53 PST, Erik Arvidsson
no flags
Patch (25.91 KB, patch)
2012-11-08 10:20 PST, Erik Arvidsson
no flags
Joshua Bell
Comment 1 2012-11-07 13:25:48 PST
Looks like this would be easy to fix in the code generators. Watch out for overloads in addition to the normal case; we may do different checking for overloads.
Erik Arvidsson
Comment 2 2012-11-08 07:53:56 PST
Joshua Bell
Comment 3 2012-11-08 09:22:10 PST
It doesn't look like run-bindings-tests --reset-results was run, so this will probably fail the bots. LGTM otherwise; sad that our coverage is so poor, but at least it means this change is likely Web-compatible.
Erik Arvidsson
Comment 4 2012-11-08 10:20:19 PST
Erik Arvidsson
Comment 5 2012-11-08 10:20:55 PST
(In reply to comment #3) > It doesn't look like run-bindings-tests --reset-results was run, so this will probably fail the bots. Oops. Done.
Adam Barth
Comment 6 2012-11-08 10:46:45 PST
Comment on attachment 173061 [details] Patch ok
WebKit Review Bot
Comment 7 2012-11-08 12:34:13 PST
Comment on attachment 173061 [details] Patch Clearing flags on attachment: 173061 Committed r133932: <http://trac.webkit.org/changeset/133932>
WebKit Review Bot
Comment 8 2012-11-08 12:34:17 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.