Bug 1066878 - Inline Object.create(x) in Ion. r=bhackett

This commit is contained in:
Jan de Mooij
2015-01-24 14:43:57 +01:00
parent 2315b9674c
commit 18019f1d3c
17 changed files with 176 additions and 56 deletions

View File

@@ -1422,7 +1422,8 @@ js::NewObjectWithTypeCommon(JSContext *cx, HandleTypeObject type, JSObject *pare
NewObjectCache &cache = cx->runtime()->newObjectCache;
NewObjectCache::EntryIndex entry = -1;
if (parent == type->proto().toObject()->getParent() &&
if (type->proto().isObject() &&
parent == type->proto().toObject()->getParent() &&
newKind == GenericObject &&
type->clasp()->isNative() &&
!cx->compartment()->hasObjectMetadataCallback())