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#newcode147
src/object-observe.js:147: return;
On 2012/11/09 14:48:41, adamk wrote:
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.
"""

Hm, I don't buy that -- I think "nominal typing" is a red herring here.
Logically, 'target' is best viewed as being a private property of the
notifier (you could actually implement it that way using ES6 private
names, if we had them already). From that POV, it's also natural to
throw if the property doesn't exist on 'this'.

https://codereview.chromium.org/11369154/

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

Reply via email to