[Webkit-unassigned] [Bug 55033] Array.prototype.push should throw RangeError if the length overflows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 9 01:57:54 PST 2011


--- Comment #1 from Gavin Barraclough <barraclough at apple.com>  2011-03-09 01:57:55 PST ---
I don't think our behavior i correct here, and I do agree that other browsers are following the spec, but I don't think the spec is particularly sane either.

* Allowing push to write a property but then also throw seems wrong.

* Allowing push to write non-array properties at all (but only one!) on an array object seems wrong.

I seems if would be nicer if the spec were written such that the range check falls before the property write.

Hmmmm.  I guess it may be best to fix this to comply with the spec as it currently stands, but we might want to also propose a fix for this.

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