On 2014/07/21 at 09:16:15, rossberg wrote:
On 2014/07/17 23:34:37, arv wrote:
> I haven't uploaded a new snapshot yet. I got stuck on the following:
>
> var length = 2;
> var a = [1];
> assertEquals(0, Array.prototype.length);
> a[Symbol.unscopables] = {length: true};
> with (a) {
> assertEquals(0, length); // FAILS
> }
>
> The problem seems to come down to length being implemented as an
ACCESSOR
and it
> seems to always return the instance (receiver) length even when:
>
> LookupIterator it(receiver, name, holder);
> // (arrayInstance, "length", ArrayPrototype)
Argh, bummer. Talking to Toon, that's a known problem with native
accessors.
He has a plan for cleaning this up, but there is quite a bit of Blink code
relying on the current behaviour, so it will take some time.
In the meantime, it's probably best to punt and comment out this case in
the
test. But please open an issue tracking it, and add the failing test to
test/mjsunit/bugs, respectively.
I can get length etc to work but it does require one more lookup which is
visible using proxies.
I also got it working by copy/pasting Object::GetProperty and make it
differentiate whether the accessor is an AccessorPair or not. This approach
is
not working in general but it does work for unscopables.
I'm not sure what is worse here?
I'll upload what I have so you can see how ugly it gets.
https://codereview.chromium.org/384963002/
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.