Watch for GC under getType, bug 746103. r=dvander

This commit is contained in:
Brian Hackett 2012-06-02 20:25:05 -07:00
parent d7ae8cab66
commit 383626552a

View File

@ -440,9 +440,13 @@ class SetPropCompiler : public PICStubCompiler
RecompilationMonitor monitor(cx);
jsid id = NameToId(name);
if (!obj->getType(cx)->unknownProperties()) {
types::TypeObject *type = obj->getType(cx);
if (monitor.recompiled())
return false;
if (!type->unknownProperties()) {
types::AutoEnterTypeInference enter(cx);
types::TypeSet *types = obj->getType(cx)->getProperty(cx, types::MakeTypeId(cx, id), true);
types::TypeSet *types = type->getProperty(cx, types::MakeTypeId(cx, id), true);
if (!types)
return false;
pic.rhsTypes->addSubset(cx, types);