Does private(expr) create a private storage block?

Andrea Giammarchi andrea.giammarchi at gmail.com
Thu Jan 19 23:56:47 PST 2012


On Fri, Jan 20, 2012 at 2:24 AM, Herby Vojčík <herby at mailbox.sk> wrote:

>
> Let the object created is foo. When calling foo.method(), it is accessing
> private(foo), not private(objectWithPrivates), since this is foo. "If yes"
> does not happen. Errors may happen since foo probably does not have private
> space (my proposal in this thread is touching this issue).
>

Object.create accept the __proto__ and a descriptor, I am not sure a
descriptor will/should ever have a private(this) configured unless there is
not a class for the descriptor but the list of configurations won't make
much sense, i.e.

{value: function () { this instanceof OuterClass /* not possible, it's just
an object */ }}





>
> I did not understand this question.



similar to what you are thinking about private.{prop} ... you answered
already

thanks and br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120120/1470dcc8/attachment.html>


More information about the es-discuss mailing list