Don't trigger write barrier when initializing private data of new objects, bug 704136.

This commit is contained in:
Brian Hackett 2011-11-22 18:21:10 -05:00
parent c26fc2aa88
commit 2fe0d7c890

View File

@ -1054,7 +1054,7 @@ JSObject::create(JSContext *cx, js::gc::AllocKind kind,
obj->elements = js::emptyObjectElements;
if (shape->getObjectClass()->hasPrivate())
obj->setPrivate(NULL);
obj->privateRef(shape->numFixedSlots()) = NULL;
if (size_t span = shape->slotSpan())
obj->initializeSlotRange(0, span);