Commit 21428224 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

[harmony] Add flat/flatMap to Array.prototype[Symbol.unscopables]

https://github.com/tc39/proposal-flatMap/issues/74
https://github.com/tc39/proposal-flatMap/pull/75

BUG=v8:7220

Change-Id: I93ce66bddbb429beaa7486311f120ec32d6a35fb
Reviewed-on: https://chromium-review.googlesource.com/c/1390125Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58537}
parent b57f89fa
......@@ -1776,6 +1776,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallTrueValuedProperty(isolate_, unscopables, "fill");
InstallTrueValuedProperty(isolate_, unscopables, "find");
InstallTrueValuedProperty(isolate_, unscopables, "findIndex");
InstallTrueValuedProperty(isolate_, unscopables, "flat");
InstallTrueValuedProperty(isolate_, unscopables, "flatMap");
InstallTrueValuedProperty(isolate_, unscopables, "includes");
InstallTrueValuedProperty(isolate_, unscopables, "keys");
InstallTrueValuedProperty(isolate_, unscopables, "values");
......
......@@ -96,6 +96,8 @@ function TestArrayPrototypeUnscopables() {
var fill = 'local fill';
var find = 'local find';
var findIndex = 'local findIndex';
var flat = 'local flat';
var flatMap = 'local flatMap';
var keys = 'local keys';
var values = 'local values';
......@@ -108,6 +110,8 @@ function TestArrayPrototypeUnscopables() {
assertEquals('local fill', fill);
assertEquals('local find', find);
assertEquals('local findIndex', findIndex);
assertEquals('local flat', flat);
assertEquals('local flatMap', flatMap);
assertEquals('local keys', keys);
assertEquals('local values', values);
assertEquals(42, toString);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment