[webkit-dev] Optional parameter in IDL and undefined JS value

Ryosuke Niwa rniwa at webkit.org
Wed Apr 20 21:58:47 PDT 2011


On Wed, Apr 20, 2011 at 9:37 PM, Jian Li <jianli at chromium.org> wrote:

> I am referring to Blob.slice(start, end) that mimics Array.slice. Where in
> WebIDL has this behavior defined? Sorry I can't find it in the spec.
>
> For Array.slice(start, end), both Safari and Chrome treat passing undefined
> as omitted parameter, while Firefox and IE treat passing undefined as 0.
>

Doesn't that mean the current behavior (i.e. treating undefined as 0) is
correct since that's what other browsers do?

If it is true that passing undefined should be treated as 0, we do not have
> a bug in JSC and V8 bindings layer. However, we do have a bug in JSC and V8
> internals.
>

I don't get what you mean here.  If there are no bugs in JSC/V8 bindings,
then what are you trying to "fix"?

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110420/68a84555/attachment.html>


More information about the webkit-dev mailing list