https://codereview.chromium.org/11369154/diff/1/src/object-observe.js
File src/object-observe.js (right):
https://codereview.chromium.org/11369154/diff/1/src/object-observe.js#newcode65
src/object-observe.js:65: changeObservers: new InternalArray,
On 2012/11/09 14:41:25, rossberg wrote:
Nit: can we perhaps rename that property to just "observers"? Sounds
less like a
method. :)
It's named like this to match the spec's [[ChangeObservers]]; Rafael, ok
with you if we change this to not match?
https://codereview.chromium.org/11369154/diff/1/src/object-observe.js#newcode147
src/object-observe.js:147: return;
On 2012/11/09 14:41:25, rossberg wrote:
This is calling the notify method on something that's not a notifier.
Shouldn't
this better be an error?
Here's what arv said about this when I asked him a few months ago:
"""
No, we are trying to remove nominal typing from ES6.
In this case I have considered adding these internal properties lazily
as needed. This might be required to allow a proxy to be used as a
notifier.
"""
https://codereview.chromium.org/11369154/diff/1/test/mjsunit/harmony/object-observe.js
File test/mjsunit/harmony/object-observe.js (right):
https://codereview.chromium.org/11369154/diff/1/test/mjsunit/harmony/object-observe.js#newcode121
test/mjsunit/harmony/object-observe.js:121: }, TypeError);
On 2012/11/09 14:41:25, rossberg wrote:
Also: notifier.notify.call({}, { type: 'a' })
Does nothing, but perhaps should throw? (see other comment)
Added a test for this below
https://codereview.chromium.org/11369154/diff/1/test/mjsunit/harmony/object-observe.js#newcode124
test/mjsunit/harmony/object-observe.js:124: assertFalse(recordCreated);
// not observed yet
On 2012/11/09 14:41:25, rossberg wrote:
Nit: 2 spaces before //
Damn, WebKit vs google3 style getting me in trouble...
https://codereview.chromium.org/11369154/diff/1/test/mjsunit/harmony/object-observe.js#newcode138
test/mjsunit/harmony/object-observe.js:138: object: notifier, // object
property is ignored
On 2012/11/09 14:41:25, rossberg wrote:
dito
Done.
https://codereview.chromium.org/11369154/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev