Added test cases with defineProperty (both accessor and data properties).
Also
reversed ordering to match ES5's [[DefineOwnProperty]] on Array:
http://ecma-international.org/ecma-262/5.1/#sec-15.4.5.1
I figured out where the length update was coming from: v8natives.js has
DefineArrayProperty() which handles updating length.
https://chromiumcodereview.appspot.com/11369135/diff/1/src/objects.cc
File src/objects.cc (right):
https://chromiumcodereview.appspot.com/11369135/diff/1/src/objects.cc#newcode10322
src/objects.cc:10322: if (!preexists && self->IsJSArray())
On 2012/11/08 16:50:20, rossberg wrote:
Maybe make that an "else if (self->IsJSArray())"
Done.
https://chromiumcodereview.appspot.com/11369135/diff/1/src/objects.cc#newcode10349
src/objects.cc:10349: Handle<Object> newValue = Object::GetElement(self,
index);
On 2012/11/08 16:50:20, rossberg wrote:
Not your change, but while you're at it, can you also fix this
misspelling of
'newValue' I overlooked?
Fixed.
https://chromiumcodereview.appspot.com/11369135/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev