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

Unified Diff: src/objects.cc

Issue 229373007: Remove uses of non-handlified GetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 3485f5fe1408022631df75120ae1f582f26a6d27..73046ddb091109abb315e7d61cef349f8f519f9f 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5046,13 +5046,15 @@ Object* JSObject::GetHiddenPropertiesHashTable() {
return GetHeap()->undefined_value();
}
} else {
- PropertyAttributes attributes;
- // You can't install a getter on a property indexed by the hidden string,
- // so we can be sure that GetLocalPropertyPostInterceptor returns a real
- // object.
- return GetLocalPropertyPostInterceptor(this,
- GetHeap()->hidden_string(),
- &attributes)->ToObjectUnchecked();
+ LookupResult result(GetIsolate());
+ LocalLookupRealNamedProperty(GetHeap()->hidden_string(), &result);
+ if (result.IsFound()) {
+ ASSERT(result.IsNormal());
+ ASSERT(result.holder() == this);
+ Object* value = GetNormalizedProperty(&result);
+ if (!value->IsTheHole()) return value;
+ }
+ return GetHeap()->undefined_value();
}
}
@@ -5854,9 +5856,8 @@ Handle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
// In particular, don't try to copy the length attribute of
// an array.
if (attributes != NONE) continue;
- Handle<Object> value(
- copy->GetProperty(*key_string, &attributes)->ToObjectUnchecked(),
- isolate);
+ Handle<Object> value = Object::GetProperty(copy, key_string);
+ CHECK_NOT_EMPTY_HANDLE(isolate, value);
if (value->IsJSObject()) {
Handle<JSObject> result = VisitElementOrProperty(
copy, Handle<JSObject>::cast(value));
@@ -13314,20 +13315,6 @@ MaybeHandle<Object> JSObject::GetPropertyPostInterceptor(
}
-MaybeObject* JSObject::GetLocalPropertyPostInterceptor(
- Object* receiver,
- Name* name,
- PropertyAttributes* attributes) {
- // Check local property in holder, ignore interceptor.
- LookupResult result(GetIsolate());
- LocalLookupRealNamedProperty(name, &result);
- if (result.IsFound()) {
- return GetProperty(receiver, &result, name, attributes);
- }
- return GetHeap()->undefined_value();
-}
-
-
MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(
Handle<JSObject> object,
Handle<Object> receiver,
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698