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

Unified Diff: src/objects-inl.h

Issue 321543004: Rewrite GetPropertyAttribute to use the LookupIterator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove bogus asserts Created 6 years, 6 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/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 2bca797d18a8bc5d33c839e842a0474a33530dbc..e996662ef91beffbd09bfeeacd3fb35cceb0a529 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6418,7 +6418,7 @@ bool JSReceiver::HasProperty(Handle<JSReceiver> object,
Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
return JSProxy::HasPropertyWithHandler(proxy, name);
}
- return GetPropertyAttribute(object, name) != ABSENT;
+ return GetPropertyAttributes(object, name) != ABSENT;
}
@@ -6427,17 +6427,18 @@ bool JSReceiver::HasOwnProperty(Handle<JSReceiver> object, Handle<Name> name) {
Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
return JSProxy::HasPropertyWithHandler(proxy, name);
}
- return GetOwnPropertyAttribute(object, name) != ABSENT;
+ return GetOwnPropertyAttributes(object, name) != ABSENT;
}
-PropertyAttributes JSReceiver::GetPropertyAttribute(Handle<JSReceiver> object,
- Handle<Name> key) {
+PropertyAttributes JSReceiver::GetPropertyAttributes(Handle<JSReceiver> object,
+ Handle<Name> key) {
uint32_t index;
if (object->IsJSObject() && key->AsArrayIndex(&index)) {
return GetElementAttribute(object, index);
}
- return GetPropertyAttributeWithReceiver(object, object, key);
+ LookupIterator it(object, key);
+ return GetPropertyAttributes(&it);
}
« 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