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.
https://codereview.chromium.org/384963002/diff/100001/test/mjsunit/harmony/proxies-with-unscopables.js
File test/mjsunit/harmony/proxies-with-unscopables.js (right):
https://codereview.chromium.org/384963002/diff/100001/test/mjsunit/harmony/proxies-with-unscopables.js#newcode6
test/mjsunit/harmony/proxies-with-unscopables.js:6: // Flags:
--harmony-proxies
On 2014/07/17 15:12:13, rossberg wrote:
> Hm, shouldn't there also be some tests that actually define
@@unscopables on
a
> proxy, and one that uses a proxy as @@unscopables?
Like I said in a comment on the CL. Proxies cannot have symbols as
property
names.
Right, sorry. But it should still be possible to have a test using a proxy
for
the @@unscopables object.
https://codereview.chromium.org/384963002/
--
--
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/d/optout.