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

Jian Li jianli at chromium.org
Wed Apr 20 22:08:21 PDT 2011

On Wed, Apr 20, 2011 at 9:58 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> 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"?

I mean we need to fix Array.slice behavior in JSC and V8 since Array.slice
is not defined in our IDL.

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

More information about the webkit-dev mailing list