From 7b04a68d239729c381b50ee600fc1b181a763050 Mon Sep 17 00:00:00 2001 From: "rossberg@chromium.org" Date: Mon, 30 Jun 2014 14:37:07 +0000 Subject: [PATCH] ES6: Add missing Set.prototype.keys function https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype.keys The value of the keys property is just the initial value of the values function. BUG=v8:3411 LOG=Y R=rossberg@chromium.org Review URL: https://codereview.chromium.org/353293003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/collection-iterator.js | 1 + test/mjsunit/harmony/collection-iterator.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/collection-iterator.js b/src/collection-iterator.js index b8b304e..096e30d 100644 --- a/src/collection-iterator.js +++ b/src/collection-iterator.js @@ -87,6 +87,7 @@ function ExtendSetPrototype() { InstallFunctions($Set.prototype, DONT_ENUM, $Array( 'entries', SetEntries, + 'keys', SetValues, 'values', SetValues )); diff --git a/test/mjsunit/harmony/collection-iterator.js b/test/mjsunit/harmony/collection-iterator.js index a3a950a..93113f6 100644 --- a/test/mjsunit/harmony/collection-iterator.js +++ b/test/mjsunit/harmony/collection-iterator.js @@ -37,6 +37,11 @@ })(); +(function TestSetIteratorKeys() { + assertEquals(Set.prototype.keys, Set.prototype.values); +})(); + + (function TestSetIteratorEntries() { var s = new Set; s.add(1); -- 2.7.4