[Webkit-unassigned] [Bug 83305] toNativeArray should not require a real array

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 5 17:48:53 PDT 2012


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





--- Comment #1 from Cameron McCormack <cam at mcc.id.au>  2012-04-05 17:48:53 PST ---
Erik, sorry I don't follow what your suggestion for making the #es-sequence conversion behave more like generic Array methods.  Do you mean accepting any object, and not just an Array or platform object with indexed properties or platform array object?  The spec used to say this some time ago, but not since I wanted to allow overloads between sequences and dictionaries, such as:

  void f(SomeDict x);
  void f(sequence<T> x);

You're right that I could check for a "length" property, but so far overload resolution does not look at the properties on an object at all before deciding which overload to call.  It would also make it confusing what to do when the dictionary type has a "length" member too.  Well I guess we could then disallow the overloading in that case, but this seems to be complicating things.

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