Commit 4907f424 authored by vegorov@chromium.org's avatar vegorov@chromium.org

Filter transitions while searching for CONSTANT_FUNCTION property in Call::ComputeTarget.

Otherwise transition will hide CONSTANT_FUNCTION property with the same name residing on the prototype.

R=danno@chromium.org
BUG=v8:1883

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f648626e
...@@ -748,7 +748,8 @@ bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) { ...@@ -748,7 +748,8 @@ bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) {
type->LookupInDescriptors(NULL, *name, &lookup); type->LookupInDescriptors(NULL, *name, &lookup);
// If the function wasn't found directly in the map, we start // If the function wasn't found directly in the map, we start
// looking upwards through the prototype chain. // looking upwards through the prototype chain.
if (!lookup.IsFound() && type->prototype()->IsJSObject()) { if ((!lookup.IsFound() || IsTransitionType(lookup.type()))
&& type->prototype()->IsJSObject()) {
holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); holder_ = Handle<JSObject>(JSObject::cast(type->prototype()));
type = Handle<Map>(holder()->map()); type = Handle<Map>(holder()->map());
} else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) { } else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) {
......
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