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

Unified Diff: src/v8natives.js

Issue 8256015: Implement for-in loop for proxies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Activate test cases that relied on for-in. Created 9 years, 2 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
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 3c48264d4c2ef6f3301afa6e3b57128af6c76952..a5698e944eac3828425ff7c96095be21c1a9579c 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -884,14 +884,14 @@ function ToStringArray(obj, trap) {
}
var n = ToUint32(obj.length);
var array = new $Array(n);
- var names = {}
+ var names = {} // TODO(rossberg): use sets once they are ready.
Rico 2011/10/20 14:25:31 Please file bug
for (var index = 0; index < n; index++) {
var s = ToString(obj[index]);
if (s in names) {
throw MakeTypeError("proxy_repeated_prop_name", [obj, trap, s])
}
array[index] = s;
- names.s = 0;
+ names[s] = 0;
}
return array;
}
@@ -1010,6 +1010,7 @@ function ObjectDefineProperty(obj, p, attributes) {
function GetOwnEnumerablePropertyNames(properties) {
+ global.print("GetOwnEnumerablePropertyNames");
Rico 2011/10/20 14:25:31 Debug print?
rossberg 2011/10/24 13:31:35 Oops.
var names = new InternalArray();
for (var key in properties) {
if (%HasLocalProperty(properties, key)) {

Powered by Google App Engine
This is Rietveld 408576698