Commit 3a74348e authored by adamk's avatar adamk Committed by Commit bot

[es6] Array.prototype[Symbol.iterator].name should be 'values'

R=littledan@chromium.org
BUG=v8:4311
LOG=n

Review URL: https://codereview.chromium.org/1242623002

Cr-Commit-Position: refs/heads/master@{#29794}
parent a3452956
......@@ -138,6 +138,10 @@ utils.InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
'keys', ArrayKeys
]);
// TODO(adam): Remove this call once 'values' is in the above
// InstallFunctions block, as it'll be redundant.
utils.SetFunctionName(ArrayValues, 'values');
%AddNamedProperty(GlobalArray.prototype, symbolIterator, ArrayValues,
DONT_ENUM);
......
......@@ -47,6 +47,9 @@ function TestArrayPrototype() {
assertHasOwnProperty(Array.prototype, 'entries', DONT_ENUM);
assertHasOwnProperty(Array.prototype, 'keys', DONT_ENUM);
assertHasOwnProperty(Array.prototype, Symbol.iterator, DONT_ENUM);
assertEquals('entries', Array.prototype.entries.name);
assertEquals('keys', Array.prototype.keys.name);
assertEquals('values', Array.prototype[Symbol.iterator].name);
}
TestArrayPrototype();
......
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