defineProperty(__proto__, "shenanigans")

Andrea Giammarchi andrea.giammarchi at
Tue Nov 6 16:08:16 PST 2012

I understand the getter/setter logic, I don't get it when it comes to
value. Prototype could be used to pre-define shapes too where all
properties are described upfront but those with just a value cannot be
reused which is a limit if we think about securing prototypes.

Too bad I have missed that discussion


On Tue, Nov 6, 2012 at 4:03 PM, Axel Rauschmayer <axel at> wrote:

> This has been discussed a while back: it is similar to how a getter-only
> accessor works.
> [[[Sent from a mobile device. Please forgive brevity and typos.]]]
> Dr. Axel Rauschmayer
> axel at
> Home:
> Blog:
> On 07.11.2012, at 00:31, Andrea Giammarchi <andrea.giammarchi at>
> wrote:
> 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>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.
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list