Another de-facto insecurity we need to fix in ES5
Allen.Wirfs-Brock at microsoft.com
Fri Jun 19 15:57:32 PDT 2009
>From: es5-discuss-bounces at mozilla.org [mailto:es5-discuss-
>bounces at mozilla.org] On Behalf Of David-Sarah Hopwood
>The existing draft already precludes any modification of __proto__ after
>Object.freeze. That's because __proto__ is an own property.
In whose implementation? How do you know that somebody's hasn't implemented __proto__ as a getter property that is inherited from Object.prototype? The spec. can't really make assumptions about things that are not part of the spec.
> The oversight is that internal properties are not own properties (I think).
"internal properties" are neither own nor inherited properties. They are simply a specification mechanism that is used to define various aspects of the semantics of objects. You can't assume that any of the semantics of named properties apply to internal properties. Neither am I willing to conceded that no conceivable addition to the language will ever require the modeling of some non-property semantic state whose mutability isn't linked to the state of [[Extensible]]. For example, I can image various object finalization mechanisms that might require new per object state to specify.
More information about the es5-discuss