Jan 29 TC39 Meeting Notes

David Bruant bruant.d at gmail.com
Thu Feb 7 09:09:50 PST 2013

Le 07/02/2013 17:25, Rick Waldron a écrit :
> ## __proto__.
> YK: We just need compatibility
> LH: We need to just suck it up and standardize

> YK/BE: Discussion re: interop with current implementations.
> BE: (Review of latest changes to __proto__ in Firefox)
> EA: Matches Safari
> BE: __proto__ is configurable (can be deleted), accessor (getter and 
> setter throw), reflection does not leak.
> AWB: Involves magic
> BE: Yes, but minimal. (Confirms that latest __proto__ is out in wild, 
> Firefox)
> WH: Clarify "poisoning"?
> BE: When you call it, it throws.
> WH: So how does it know when not to throw? (If it always throws then 
> it won't work.)
> EA: Throws if called with object and setter coming from different realms
> …Discussion re: MOP semantics with __proto__
> BE: Proxy has to stratify the MOP.
Speaking of proxies, what should happen in the following case (setter 
and proxy from same realm):
var protoSetter = Object.getOwnPropertyDescriptor(Object.prototype, 
var p = new Proxy({}, handler);
protoSetter.call(p, {});

1) add a setPrototypeOf trap
2) throw because it's a proxy (which wouldn't be entirely absurd since 
extracting the setter shouldn't be encouraged).

This problem is inexistent with a data property. Is an extractable 
setter *required* for web-compatibility? I've seen lots of use of 
__proto__ as a pseudo property, but no one extracting the setter yet.

> AWB: Another issue… Objects that are non-extensible, can you change 
> __proto__? Specifically, now that we're talking about being able to 
> change __proto__, what type of objects can be changed?
> BE: Wait for Mark?
> YK?: Changing __proto__ is a write, not adding a property, so it 
> should not be affected by extensibility.
> AWB: Agree
How can one defend itself against abusive __proto__ modification? 
__proto__ becoming standard, "delete Object.prototype.__proto__" is 
hardly a reliable option, because more code will rely on its existence. 
If that's not the [[Extensible]] boolean, another boolean has to be added.


More information about the es-discuss mailing list