Commit 9110beb7 authored by antonm@chromium.org's avatar antonm@chromium.org

Don't do a second lookup as we have it already.

Review URL: http://codereview.chromium.org/149007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3d065cce
......@@ -328,11 +328,11 @@ Object* CallIC::LoadFunction(State state,
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 @@ Object* CallIC::LoadFunction(State state,
}
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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment