Chromium Code Reviews

Unified Diff: src/runtime.cc

Issue 8834: Introduce access control in propertyIsEnumerable.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 620)
+++ src/runtime.cc (working copy)
@@ -1905,10 +1905,8 @@
return Heap::ToBoolean(object->HasElement(index));
}
- LookupResult result;
- object->LocalLookup(key, &result);
- if (!result.IsProperty()) return Heap::false_value();
- return Heap::ToBoolean(!result.IsDontEnum());
+ PropertyAttributes att = object->GetLocalPropertyAttribute(key);
+ return Heap::ToBoolean(att != ABSENT && att != DONT_ENUM);
}

Powered by Google App Engine