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

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. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
This is Rietveld 408576698