Backout changeset 2766d0ee65c5 (bug 903802) to fix bug 906378.

This commit is contained in:
Ryan VanderMeulen 2013-09-11 16:49:56 -04:00
parent 6fec648cd7
commit 6dc82d0dd5

View File

@ -2276,13 +2276,8 @@ TypeObject::getFromPrototypes(JSContext *cx, jsid id, HeapTypeSet *types, bool f
}
types::TypeObject *protoType = proto->getType(cx);
if (!protoType)
return;
if (protoType->unknownProperties()) {
// Type information only describes normal native properties, not those
// found or inherited from non-native classes.
if (protoType->clasp->isNative())
types->addType(cx, Type::UnknownType());
if (!protoType || protoType->unknownProperties()) {
types->addType(cx, Type::UnknownType());
return;
}
@ -3527,10 +3522,7 @@ JSObject::splicePrototype(JSContext *cx, const Class *clasp, Handle<TaggedProto>
AutoEnterAnalysis enter(cx);
if (protoType && protoType->unknownProperties() && !type->unknownProperties()) {
// As in getFromPrototypes, property types do not need to be propagated
// from non-native prototypes.
if (protoType->clasp->isNative())
type->markUnknown(cx);
type->markUnknown(cx);
return true;
}