Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(933)

Unified Diff: src/proxy.js

Issue 7237050: Implement Object.getOwnPropertyDescriptor for proxies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/property.h ('k') | src/v8natives.js » ('j') | src/v8natives.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/proxy.js
diff --git a/src/proxy.js b/src/proxy.js
index cb9c020e35c60c9b0cdcf15e961ca9a8fdb73789..72b5c225652a71494c24d671bfcc67b5ad86891f 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -135,3 +135,10 @@ function DerivedSetTrap(receiver, name, val) {
function DerivedHasTrap(name) {
return !!this.getPropertyDescriptor(name)
}
+
+function DerivedKeysTrap() {
+ return this.getOwnPropertyNames().filter(
+ function(name) {
+ return this.getOwnPropertyDescriptor('' + name).enumerable
+ }.bind(this));
+}
« no previous file with comments | « src/property.h ('k') | src/v8natives.js » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698