defineProperty(__proto__, "shenanigans")

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Nov 6 15:31:30 PST 2012


so this mean that freezing a Contructor.prototype to enforce/ensure nobody
can change runtime that prototype will result in unusable code as we know,
right? Or we should never pre define properties that should be changed
runtime? Second one works and stink at the same time.

I preferred the old V8 behavior ... if I freeze a __proto__ the object
should not pass through that proto when a property is set unless the proto
has a setter ... but this is another story I guess.

Anyway, thanks for explaining this which is gold for a blog post.

br


On Tue, Nov 6, 2012 at 1:46 PM, Brandon Benvie <brandon at brandonbenvie.com>wrote:

> Clarification: if an object has no own property, then it defers to the
> writability from the prototype chain. If it has an own property then it
> never checks the prototype chain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121106/64f8195b/attachment.html>


More information about the es-discuss mailing list