[es7] Array.prototype.includes should be unscopable

R=littledan@chromium.org
BUG=v8:5059

Review-Url: https://codereview.chromium.org/2033263002
Cr-Commit-Position: refs/heads/master@{#36721}
This commit is contained in:
adamk 2016-06-03 11:28:21 -07:00 committed by Commit bot
parent 0ed27704f6
commit 611257fbb1
2 changed files with 6 additions and 0 deletions

View File

@ -1657,6 +1657,7 @@ var unscopables = {
fill: true, fill: true,
find: true, find: true,
findIndex: true, findIndex: true,
includes: true,
keys: true, keys: true,
}; };

View File

@ -673,3 +673,8 @@
assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 4)); assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 4));
assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2, 2)); assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2, 2));
})(); })();
(function testUnscopable() {
assertTrue(Array.prototype[Symbol.unscopables].includes);
})();