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

Unified Diff: src/ic.cc

Issue 488073002: Further reduce LookupResult usage (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More consistency 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..fdad0caedb12b0add480cf89ecaefde3fa5d2949 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.IsFound() || !it.HasProperty()) return false;
+ 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