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

Unified Diff: src/proxy.js

Issue 19384004: Proxies: Make 'with' work, plus minor other fixes (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
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 528c47d80dcda3a3fbab317ce0cc34ed05b83905..de9be50ddca045cd1e4d2d60236ab7211b33ba9f 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -192,8 +192,12 @@ function DerivedEnumerateTrap() {
var name = names[i]
if (IS_SYMBOL(name)) continue
var desc = this.getPropertyDescriptor(TO_STRING_INLINE(name))
- if (!IS_UNDEFINED(desc) && desc.enumerable) {
- enumerableNames[count++] = names[i]
+ if (!IS_UNDEFINED(desc)) {
+ if (!desc.configurable) {
+ throw MakeTypeError("proxy_prop_not_configurable",
+ [this, "getPropertyDescriptor", name])
+ }
+ if (desc.enumerable) enumerableNames[count++] = names[i]
Yang 2013/07/19 12:05:43 We use semicolons pretty sparingly in this file. I
rossberg 2013/07/19 14:05:02 Aesthetics? :)
}
}
return enumerableNames
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698