[Webkit-unassigned] [Bug 21257] JS bindings should throw when too few arguments are passed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 30 11:35:07 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=21257





--- Comment #26 from Ojan Vafai <ojan at chromium.org>  2010-06-30 11:35:06 PST ---
(In reply to comment #25)
> > That said, I think adding the plumbing to at least warn in the console is not something I oppose (in fact I support it).
> 
> Yeah, logging a warning seems like a win unless it produces too much console spam.
> 
> > > Maybe that's a point worth bringing up to the WebIDL standards committee?  IMHO, it's a lot easier to change to not throwing exceptions than it is to change to throwing exceptions.
> > 
> > I am considering making this change.
> 
> My perspective is that we should aim for convergence with other browsers.  If we decide there's too much WebKit-specific code out there that would break with this change, then we should try to convince other browsers to be more lenient so we can eventually interoperate.

I think that if we made all the cases where arguments should be optional as I suggested above, we'd find that there is very little webkit-specific code that relies on too few arguments generally not throwing an exception. That's just my intuition of course. Whatever we do with this bug, we should try to convince other browsers to make the obvious cases optional (e.g. addEventListener).

I still think we should make the cases I listed optional and try this patch and see what breaks. It incrementally approaches the behavior of other browsers and is the only way we'll get the data we need to evaluate whether throwing on too few arguments is remotely possible.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list