On 2014/01/17 16:03:25, arv wrote:
On 2014/01/17 15:20:25, Dmitry Lomov (chromium) wrote:
> On 2014/01/17 15:08:35, arv wrote:
> > On 2014/01/17 06:57:31, Dmitry Lomov (chromium) wrote:
> > > On 2014/01/16 16:04:53, Michael Starzinger wrote:
> > > > Andreas has a strong opinion about this poison pill. So I defer
to his
> > > judgement
> > > > about the CL.
> > >
> > > Here are my thoughts:
> > > The blessed way to change a prototype of an object in ES6 is
> > > Reflect.setPrototypeOf. __proto__ setter is buried there in
Appendix B
for
> > > backward compatibility reasons.
> > > However if we unpoison __proto__ setter without shipping
> > Reflect.setPrototypeOf,
> > > __proto__ setter is what the Internet will use.
> > > Therefore we should only unpoison __proto__ setter after we have
shipped
> > > Reflect.setPrototypeOf.
> >
> > Object.setPrototypeOf
> >
> >
>
http://people.mozilla.org/%25257Ejorendorff/es6-draft.html#sec-object.setprototypeof
> >
> > This one is trivial and we already have a pending patch for it.
> >
>
https://code.google.com/p/v8/issues/detail?id=2675&q=setPrototypeOf&colspec=ID%25252520Type%25252520Status%25252520Priority%25252520Owner%25252520Summary%25252520HW%25252520OS%25252520Area%25252520Stars
> >
> > I'm happy to take care of that but this one needs to come first.
>
> Sorry I am not following. I suggest we land Object.setPrototypeOf first
(the
> patch is essentially:
> function ObjectSetPrototypeOf(obj, proto) {
> %SetPrototype(obj, proto);
> return obj;
> }
> + hooking it up in the right places - this patch does not need
unpoisoning
> __proto__ setter, does it?)
>
> We can then unpoison __proto__ setter when we see fit.
You are right. I felt that removing the poison setter was a more natural
incremental step.
I'll prepare a CL for setPrototypeOf.
Now that setPrototypeOf landed I merged and retested this and it passes on
all
the tests I know of (all + webkit) without any changes to the CL.
Removing the poison pill actually simplifies our code and it removes one
branch
from all calls to getOwnPropertyDescriptor. It is also not compatible with
other
browsers and does not match annex B, which if implemented should follow the
spec
in annex B... and yada yada yada...
Can I get a review?
Thanks.
https://codereview.chromium.org/103343005/
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.