Short example from ES2016 compatibility table: ///////// var obj = Object.create({ a: "qux", d: "qux" }); obj.a = "foo"; obj.b = "bar"; obj.c = "baz"; var e = Object.entries(obj); return Array.isArray(e) && e.length === 3 && String(e[0]) === "a,foo" && String(e[1]) === "b,bar" && String(e[2]) === "c,baz"; /////// See description by following url https://github.com/tc39/proposal-object-values-entries
Created attachment 285854 [details] Patch Patch
Comment on attachment 285854 [details] Patch Attachment 285854 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1853755 New failing tests: js/Object-getOwnPropertyNames.html
Created attachment 285857 [details] Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 285854 [details] Patch Attachment 285854 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1853764 New failing tests: js/Object-getOwnPropertyNames.html
Created attachment 285858 [details] Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 285854 [details] Patch Attachment 285854 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1853766 New failing tests: js/Object-getOwnPropertyNames.html
Created attachment 285859 [details] Archive of layout-test-results from ews126 for ios-simulator-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-elcapitan-wk2 Platform: Mac OS X 10.11.5
Comment on attachment 285854 [details] Patch Attachment 285854 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1853768 New failing tests: js/Object-getOwnPropertyNames.html
Created attachment 285861 [details] Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 285903 [details] Patch Fix layout tests
Comment on attachment 285903 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285903&action=review r=me > JSTests/stress/object-entries.js:106 > +passed = arr2.length > 1 && arr2[0] === "ownKeys"; Can we make this assert exactly how lon the array is? > JSTests/stress/object-entries.js:116 > +Array.prototype.push = function () { throw new Error("Array.prototype.push should not be used during invoking of Object.entries.")}; This is a good test. Can you also add one where you replace Reflect.getOwnPropertyDescriptor to make sure the algorithm doesn't call that?
Committed r204419: <http://trac.webkit.org/changeset/204419> All reviewed patches have been landed. Closing bug.