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

Unified Diff: src/ic.cc

Issue 488073002: Further reduce LookupResult usage (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 4 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/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index b080a316531bd333622b67309286d9cefe4ee957..c5002fa5322c10b19a8a5642456c54a68087003c 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -278,11 +278,10 @@ bool IC::TryRemoveInvalidPrototypeDependentStub(Handle<Object> receiver,
}
if (receiver->IsGlobalObject()) {
- LookupResult lookup(isolate());
- GlobalObject* global = GlobalObject::cast(*receiver);
- global->LookupOwnRealNamedProperty(name, &lookup);
- if (!lookup.IsFound()) return false;
- PropertyCell* cell = global->GetPropertyCell(&lookup);
+ Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
+ LookupIterator it(global, name, LookupIterator::CHECK_PROPERTY);
+ if (!it.HasProperty()) return false;
Yang 2014/08/20 14:53:17 More a question than comment: why do we check HasP
Toon Verwaest 2014/08/20 15:04:33 Dictionary mode objects always result in PROPERTY
+ Handle<PropertyCell> cell = it.GetPropertyCell();
return cell->type()->IsConstant();
}
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698