Revision: 10312
Author: [email protected]
Date: Mon Jan 2 00:54:01 2012
Log: 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.
[email protected]
BUG=v8:1883
Review URL: http://codereview.chromium.org/9064003
http://code.google.com/p/v8/source/detail?r=10312
Modified:
/branches/bleeding_edge/src/ast.cc
=======================================
--- /branches/bleeding_edge/src/ast.cc Mon Dec 5 06:43:28 2011
+++ /branches/bleeding_edge/src/ast.cc Mon Jan 2 00:54:01 2012
@@ -748,7 +748,8 @@
type->LookupInDescriptors(NULL, *name, &lookup);
// If the function wasn't found directly in the map, we start
// 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()));
type = Handle<Map>(holder()->map());
} else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev