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

Unified Diff: src/ic.cc

Issue 149007: Don't do a second lookup as we have it already. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 2303)
+++ src/ic.cc (working copy)
@@ -328,11 +328,11 @@
UpdateCaches(&lookup, state, object, name);
}
+ // Get the property.
+ PropertyAttributes attr;
+ result = object->GetProperty(*object, &lookup, *name, &attr);
+ if (result->IsFailure()) return result;
if (lookup.type() == INTERCEPTOR) {
- // Get the property.
- PropertyAttributes attr;
- result = object->GetProperty(*name, &attr);
- if (result->IsFailure()) return result;
// If the object does not have the requested property, check which
// exception we need to throw.
if (attr == ABSENT) {
@@ -341,11 +341,6 @@
}
return TypeError("undefined_method", object, name);
}
- } else {
- // Lookup is valid and no interceptors are involved. Get the
- // property.
- result = object->GetProperty(*name);
- if (result->IsFailure()) return result;
}
ASSERT(result != Heap::the_hole_value());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698