Bug 770235 - Fix mistaken patch (r=dvander)

This commit is contained in:
Eric Faust 2012-07-09 16:58:21 -07:00
parent f6d146c74e
commit dee3c8e4eb

View File

@ -4918,10 +4918,13 @@ IonBuilder::TestCommonPropFunc(JSContext *cx, types::TypeSet *types, HandleId id
shape->setterObject();
// Save the first seen, or verify uniqueness.
if (!found)
found = curFound;
else if (found != curFound)
if (!found) {
if (!curFound->isFunction())
return true;
found = curFound;
} else if (found != curFound) {
return true;
}
// We only support cases with a single prototype shared. This is
// overwhelmingly more likely than having multiple different prototype
@ -4933,7 +4936,7 @@ IonBuilder::TestCommonPropFunc(JSContext *cx, types::TypeSet *types, HandleId id
}
// No need to add a freeze if we didn't find anything
if (!found || !found->isFunction())
if (!found)
return true;
JS_ASSERT(foundProto);
@ -4971,6 +4974,8 @@ IonBuilder::TestCommonPropFunc(JSContext *cx, types::TypeSet *types, HandleId id
}
}
*funcp = found->toFunction();
return true;
}