Re: Mutable Proto

2013-03-24 Thread Mark S. Miller
[+google-caja-discuss] On Sun, Mar 24, 2013 at 10:44 AM, Aymeric Vitte wrote: > > Le 22/03/2013 19:33, Mark S. Miller a écrit : > > On Fri, Mar 22, 2013 at 6:03 PM, Aymeric Vitte > wrote: > >> As far as I remember when I looked at it, there was a getfreevar >> function or something like this

Re: Mutable Proto

2013-03-24 Thread Aymeric Vitte
Le 22/03/2013 19:33, Mark S. Miller a écrit : On Fri, Mar 22, 2013 at 6:03 PM, Aymeric Vitte > wrote: As far as I remember when I looked at it, there was a getfreevar function or something like this parsing the code (or I misunderstood, see [1] but do

Re: Mutable Proto

2013-03-22 Thread Mark S. Miller
On Fri, Mar 22, 2013 at 6:03 PM, Aymeric Vitte wrote: > As far as I remember when I looked at it, there was a getfreevar > function or something like this parsing the code (or I misunderstood, see > [1] but don't read the proposal, it's wrong, even if I don't totally give > up with the concept).

Re: Mutable Proto

2013-03-22 Thread Aymeric Vitte
As far as I remember when I looked at it, there was a getfreevar function or something like this parsing the code (or I misunderstood, see [1] but don't read the proposal, it's wrong, even if I don't totally give up with the concept). But anyway, since it will change, does it exist an officia

Re: Mutable Proto

2013-03-21 Thread Andrea Giammarchi
On Wed, Mar 20, 2013 at 10:18 PM, Brendan Eich wrote: > Your writing is unclear and overlong, and full of unjustified airs of > grievance -- please work on it. I'll do more than that, I publicly and officially apologies for my writing plus I will step back from this ML for an undefined amount o

Re: Mutable Proto

2013-03-21 Thread Kevin Reid
Correction: On Thu, Mar 21, 2013 at 2:16 PM, Kevin Reid wrote: > Yes. SES requires 'with' as a means to hook into 'global' variable reads > and writes; without it, it is impossible without performing a parse and scope analysis of the code to be evaluated > to emulate the semantics of browser

Re: Mutable Proto

2013-03-21 Thread Brendan Eich
Brandon Benvie wrote: On 3/21/2013 1:57 PM, Brendan Eich wrote: No 'with' required for SES AFAIK. Do you have a code.google.com link? Cc'ing Mark in case he is not reading es-discuss frequently. First, it doesn't matter: my point about SES being deployed in the real world stands, whether SES

Re: Mutable Proto

2013-03-21 Thread Mark S. Miller
On Thu, Mar 21, 2013 at 10:04 PM, Brandon Benvie wrote: > On 3/21/2013 1:57 PM, Brendan Eich wrote: > >> No 'with' required for SES AFAIK. Do you have a code.google.com link? >> Cc'ing Mark in case he is not reading es-discuss frequently. >> > Thanks. >>> If I understand correctly, this wrapper

Re: Mutable Proto

2013-03-21 Thread Brandon Benvie
On 3/21/2013 1:57 PM, Brendan Eich wrote: No 'with' required for SES AFAIK. Do you have a code.google.com link? Cc'ing Mark in case he is not reading es-discuss frequently. /be Brandon Benvie wrote: On 3/21/2013 11:39 AM, Brendan Eich wrote: Andrea Giammarchi wrote: yes, SES, the non real wo

Re: Mutable Proto

2013-03-21 Thread Brendan Eich
No 'with' required for SES AFAIK. Do you have a code.google.com link? Cc'ing Mark in case he is not reading es-discuss frequently. /be Brandon Benvie wrote: On 3/21/2013 11:39 AM, Brendan Eich wrote: Andrea Giammarchi wrote: yes, SES, the non real world out there, needs __proto__ ... shenani

Re: Mutable Proto

2013-03-21 Thread Jason Orendorff
On Thu, Mar 21, 2013 at 2:38 AM, François REMY < francois.remy@outlook.com> wrote: > Phasing out failed experiments *is* possible. I don't think a browser that > doesn't support or or even document.layers would have a > lot of problems to view the web as it's now, yet I remember a time where

Re: Mutable Proto

2013-03-21 Thread Brandon Benvie
On 3/21/2013 11:39 AM, Brendan Eich wrote: Andrea Giammarchi wrote: yes, SES, the non real world out there, needs __proto__ ... shenanigans all over the world because of '__proto__' ain't important. SES is deployed on major Google properties. I recall also Yahoo! but not sure if still up. I

Re: Mutable Proto

2013-03-21 Thread Brendan Eich
Andrea Giammarchi wrote: yes, SES, the non real world out there, needs __proto__ ... shenanigans all over the world because of '__proto__' ain't important. SES is deployed on major Google properties. I recall also Yahoo! but not sure if still up. I think again you are out of line. Am I wrong

RE: Mutable Proto

2013-03-21 Thread François REMY
> If against all odds, all code everywhere *did* magically drop __proto__ > in favor of Object.setPrototypeOf, then SES and similar subsets would be > unable to protect secure code from ambient Object.setPrototypeOf usage > from the insecure side on the secure side's objects, unless > Object.setPro

Re: Mutable Proto

2013-03-20 Thread Andrea Giammarchi
yes, SES, the non real world out there, needs __proto__ ... shenanigans all over the world because of '__proto__' ain't important. Thanks to be clear on it On Wed, Mar 20, 2013 at 10:18 PM, Brendan Eich wrote: > Your writing is unclear and overlong, and full of unjustified airs of > grievance

Re: Mutable Proto

2013-03-20 Thread Brendan Eich
Your writing is unclear and overlong, and full of unjustified airs of grievance -- please work on it. To recap yet again (last time): __proto__ is a de-facto standard we cannot defeat, whether anyone likes it or not. Adding Object.setPrototypeOf does not help, because code won't migrate to it

Re: Mutable Proto

2013-03-20 Thread Andrea Giammarchi
never cared about IE much on mobile and I do not care about 100% or __proto__ support ... there is 100% of Object.prototype pollution support since ever and everybody knows that is a bad technique, specially done through direct property rather than through a descriptor. What is the point then ? Sh

Re: Mutable Proto

2013-03-20 Thread Rick Waldron
On Wed, Mar 20, 2013 at 3:40 PM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > I think zepto is using that to modify runtime NodeList results after > querySelectorAll but in any case it was not me saying that __proto__ is > used already. I use it only to shim getPrototypeOf to be hones

RE: Mutable Proto

2013-03-20 Thread Nathan Wall
imming private properties into ES5. It may be something I want to continue doing in ES6 depending on how private properties are implemented in ES6.  The full working library is available at  https://github.com/Nathan-Wall/Secrets Let me explain the relevant portions for why I want mutable prot

Re: Mutable Proto

2013-03-20 Thread Andrea Giammarchi
I think zepto is using that to modify runtime NodeList results after querySelectorAll but in any case it was not me saying that __proto__ is used already. I use it only to shim getPrototypeOf to be honest and I don't think is a good idea to use it at all. My point is that Object.setPrototypeOf doe

Re: Mutable Proto

2013-03-20 Thread David Bruant
Le 20/03/2013 19:04, Andrea Giammarchi a écrit : I don't understand where is the problem ... any library that uses __proto__ can and should be updated with a shim waiting for next version of JS to support it. Which library? What are the inconsistencies between the current __proto__ draft spec a

Re: Mutable Proto

2013-03-20 Thread Andrea Giammarchi
I don't understand where is the problem ... any library that uses __proto__ can and should be updated with a shim waiting for next version of JS to support it. Object.setPrototypeOf = function (object, proto) { object.__proto__ = proto; return object; }; That does not look bad at all to me, e

Re: Mutable Proto

2013-03-20 Thread David Bruant
Le 20/03/2013 16:15, Brendan Eich a écrit : To recap, 1. __proto__ is out in the field, a de-facto standard on "mobile", and not going away. Adding another API doesn't help, it hurts. 2. SES and other secure subsets want same-frame (global object, "realm") mashups of code that may use __prot

Re: Mutable Proto

2013-03-20 Thread David Bruant
Le 20/03/2013 16:36, Nathan Wall a écrit : I didn't get a direct response to my question about mutating proto on objects which don't inherit from Object.prototype, but I'm inferring from [1] that it won't be possible. I find this unfortunate, but I realize this issue has seen a lot of discuss

RE: Mutable Proto

2013-03-20 Thread Nathan Wall
I didn't get a direct response to my question about mutating proto on objects which don't inherit from Object.prototype, but I'm inferring from [1] that it won't be possible.  I find this unfortunate, but I realize this issue has seen a lot of discussion in the past and there are reasons for the

Re: Mutable Proto

2013-03-20 Thread Brendan Eich
Mariusz Nowak wrote: +1! It would be great if someone will explain in detail why Object.setPrototypeOf is no go. We've been over this many times, e.g. at https://mail.mozilla.org/pipermail/es-discuss/2012-May/022904.html To recap, 1. __proto__ is out in the field, a de-facto standard on "mo

Re: Mutable Proto

2013-03-20 Thread Rick Waldron
decision. > > > > > > > > > > > > > > De : Andrea Giammarchi > > Envoyé : 18 mars 2013 17:08 > > À : Nathan Wall > > Cc : es-discuss@mozilla.org > > Objet : Re: Mutable Proto > > > > > > > > I wou

RE: Mutable Proto

2013-03-20 Thread Mariusz Nowak
t it has been decided otherwhise by the TC39 members > and I doubt they’re willing to revert their decision. > > > > > > > De : Andrea Giammarchi > Envoyé : ‎18‎ ‎mars‎ ‎2013 ‎17‎:‎08 > À : Nathan Wall > Cc : es-discuss@mozilla.org > Objet : Re: Mutable P

RE: Mutable Proto

2013-03-18 Thread François REMY
I certainly agree, but it has been decided otherwhise by the TC39 members and I doubt they’re willing to revert their decision. De : Andrea Giammarchi Envoyé : ‎18‎ ‎mars‎ ‎2013 ‎17‎:‎08 À : Nathan Wall Cc : es-discuss@mozilla.org Objet : Re: Mutable Proto I would like to see

Re: Mutable Proto

2013-03-18 Thread Andrea Giammarchi
#x27;m currently using because > I have objects which I don't want to inherit from Object.prototype but for > which I do want to have mutable proto. > > Testing in Firefox Nightly I found this workaround: > > var x = { }, y = { foo: 'bar' }; > > x.__pro

Mutable Proto

2013-03-18 Thread Nathan Wall
Object.prototype but for which I do want to have mutable proto. Testing in Firefox Nightly I found this workaround:     var x = { }, y = { foo: 'bar' };     x.__proto__ = y;     console.log(1, x.foo);     // => 1 'bar'     x.__proto__ = null;     console.log(2, x.foo);