Thanks a lot, Lasse. I too checked if Safari behaves this way. Mildly curious
who cares about 15.4.4.12 though :)  Jokes aside, is there an important
ECMAScript implementation which implements it right? Any chances that standard
should be amended?  Or all the implementations are different enough to never
find the common ground?

yours,
anton.


http://codereview.chromium.org/618002/diff/1/3
File src/builtins.cc (right):

http://codereview.chromium.org/618002/diff/1/3#newcode548
src/builtins.cc:548: // but current implementation behaves differently.
On 2010/02/17 09:11:46, Lasse Reichstein wrote:
This is also Safari compatible.
(Arguably it's also consistent with slice and with String's substring
when
omitting the second parameter).

I'm somewhat surprised that undefined here is treated differently than
argument omission---undefined behaves like 0 (which is expected), but
single arg form behaves like len (which is slice compatible as you say).

http://codereview.chromium.org/618002

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to