Another de-facto insecurity we need to fix in ES5

David-Sarah Hopwood david-sarah at jacaranda.org
Fri Jun 19 11:51:22 PDT 2009


John Cowan wrote:
> David-Sarah Hopwood scripsit:
> 
>> I support clarifying that [calling] Object.freeze prevents any further
>> mutation of all internal properties (it already prevents mutation
>> of __proto__, since that is a non-internal own-property). There's no
>> reason to treat [[Prototype]] or __proto__ as a special case.
> 
> No, but an implementation might provide a magic function setPrototype
> instead, which merely freezing internal properties would not override.
> Making it clear that [[Prototype]] can't be changed covers this case
> as well.

I meant that Object.freeze should prevent mutating all internal properties
by any means.

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com



More information about the es5-discuss mailing list