Comment #3 on issue 3536 by [email protected]: Array.prototype.{every,
filter, find, findIndex, forEach, map, some}: Use fresh primitive wrapper
for calls
https://code.google.com/p/v8/issues/detail?id=3536
`%_CallFunction` should pass the receiver through `TO_OBJECT_INLINE()`
before using it. See step 11.b.ii.1 of
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-function-objects-call-thisargument-argumentslist.
Tests:
function test(method) {
var array = [];
[1, 2][method](function() {
array.push(this);
}, ""); // primitive value
assertEquals(true, array[0] !== array[1]);
array = [];
[1, 2][method](function() {
array.push(this);
}, {}); // non-primitive value
assertEquals(false, array[0] !== array[1]);
}
test("every");
test("filter");
test("forEach");
test("map");
test("some");
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.