WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
84628
"Not enough arguments" error should be TypeError
https://bugs.webkit.org/show_bug.cgi?id=84628
Summary
"Not enough arguments" error should be TypeError
Kentaro Hara
Reported
2012-04-23 13:41:54 PDT
Currently, some custom bindings implement "Not enough arguments" error as SyntaxError. The Web IDL spec requires that it should be TypeError:
http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm
Attachments
Patch
(13.74 KB, patch)
2012-04-23 14:03 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Patch
(19.78 KB, patch)
2012-04-23 16:17 PDT
,
Kentaro Hara
darin
: commit-queue-
Details
Formatted Diff
Diff
test cases
(996 bytes, text/html)
2012-04-24 11:21 PDT
,
Kentaro Hara
no flags
Details
patch for landing
(19.54 KB, patch)
2012-04-27 19:28 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2012-04-23 14:03:50 PDT
Created
attachment 138422
[details]
Patch
Darin Adler
Comment 2
2012-04-23 15:22:15 PDT
Comment on
attachment 138422
[details]
Patch Test coverage is insufficient. There are 5 call sites in JS bindings modified, but only three test results changing. We need a test that covers each affected call site.
Kentaro Hara
Comment 3
2012-04-23 16:17:28 PDT
Created
attachment 138451
[details]
Patch
Kentaro Hara
Comment 4
2012-04-23 16:18:05 PDT
(In reply to
comment #2
)
> (From update of
attachment 138422
[details]
) > Test coverage is insufficient. There are 5 call sites in JS bindings modified, but only three test results changing. We need a test that covers each affected call site.
darin: Thanks. Added test cases.
Kentaro Hara
Comment 5
2012-04-24 10:42:05 PDT
I believe that the current behavior is just due to mis-implementation of custom bindings, but let me confirm other browsers' behaviors.
Alexey Proskuryakov
Comment 6
2012-04-24 10:54:51 PDT
I'm not particularly concerned about this change, because we've been already raising an exception, and sites hardly ever check for specific exception type. Checking other browsers is worth doing anyway.
Kentaro Hara
Comment 7
2012-04-24 11:21:39 PDT
Created
attachment 138606
[details]
test cases
Kentaro Hara
Comment 8
2012-04-24 11:22:31 PDT
Opera 11.62: WebSocket is not defined. WebSocket is not defined. XMLHttpRequest.open(): Error: WRONG_ARGUMENTS_ERR SVGLength.convertToSpecifiedUnits(): Error: WRONG_ARGUMENTS_ERR Firefox 11.0: new WebSocket(): [Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)" location: "
http://www.corp.google.com/~haraken/null/typeerror.html
Line: 12"] WebSocket.send(): [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame ::
http://www.corp.google.com/~haraken/null/typeerror.html
:: :: line 23" data: no] XMLHttpRequest.open(): [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame ::
http://www.corp.google.com/~haraken/null/typeerror.html
:: :: line 34" data: no] SVGLength.convertToSpecifiedUnits(): [Exception... "Not enough arguments [nsIDOMSVGLength.convertToSpecifiedUnits]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame ::
http://www.corp.google.com/~haraken/null/typeerror.html
:: :: line 46" data: no]
Kentaro Hara
Comment 9
2012-04-27 13:33:30 PDT
darin, ap: review?
Darin Adler
Comment 10
2012-04-27 18:24:15 PDT
Comment on
attachment 138451
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138451&action=review
> LayoutTests/ChangeLog:31 > +2012-04-23 Kentaro Hara <
haraken@chromium.org
> > + > + > + * http/tests/websocket/tests/hixie76/send-empty-expected.txt: > + * http/tests/websocket/tests/hybi/send-empty-expected.txt: > + * svg/dom/SVGLength-expected.txt:
Extra stray change log here.
Kentaro Hara
Comment 11
2012-04-27 19:28:37 PDT
Created
attachment 139324
[details]
patch for landing
WebKit Review Bot
Comment 12
2012-04-27 20:29:45 PDT
Comment on
attachment 139324
[details]
patch for landing Clearing flags on attachment: 139324 Committed
r115533
: <
http://trac.webkit.org/changeset/115533
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug