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 vitteayme...@gmail.com mailto:vitteayme...@gmail.com 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

Re: Mutable Proto

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

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

Re: Mutable Proto

2013-03-22 Thread Mark S. Miller
On Fri, Mar 22, 2013 at 6:03 PM, Aymeric Vitte vitteayme...@gmail.comwrote: 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

Re: Mutable Proto

2013-03-21 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 bren...@mozilla.com wrote: Your writing is unclear and overlong, and full of unjustified

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

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

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 blink or marquee or even document.layers would have a lot of problems to view the web as it's now, yet I remember a

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__ ...

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

Re: Mutable Proto

2013-03-21 Thread Mark S. Miller
On Thu, Mar 21, 2013 at 10:04 PM, Brandon Benvie bben...@mozilla.comwrote: 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

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 Kevin Reid
Correction: On Thu, Mar 21, 2013 at 2:16 PM, Kevin Reid kpr...@google.com 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

Re: Mutable Proto

2013-03-21 Thread Andrea Giammarchi
On Wed, Mar 20, 2013 at 10:18 PM, Brendan Eich bren...@mozilla.com 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

RE: Mutable Proto

2013-03-20 Thread Mariusz Nowak
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 Object.setPrototypeOf(object, proto) too

Re: Mutable Proto

2013-03-20 Thread Rick Waldron
: Re: Mutable Proto I would like to see Object.setPrototypeOf(object, proto) too and a disappeared __proto__ 'till now breaking too much. It would be much easier to implement all shenanigans via Object.defineProperty(Object.prototype, '__proto__', {whatever}); rather than fix

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

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

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

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 __proto__

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,

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 ?

Mutable Proto

2013-03-18 Thread Nathan Wall
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);     // = 2 undefined     x.__proto__ = y

Re: Mutable Proto

2013-03-18 Thread Andrea Giammarchi
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.__proto__ = y; console.log(1, x.foo); // = 1 'bar' x.__proto__

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