Bug 1105232 - Fix race condition updating copy-on-write array owner pointer in compacting GC r=terrence

This commit is contained in:
Jon Coppeard 2014-12-01 06:05:41 -08:00
parent 3665e05348
commit a32fe4c0ad

View File

@ -2769,8 +2769,7 @@ JSObject::fixupAfterMovingGC()
ObjectElements *header = as<NativeObject>().getElementsHeader();
if (header->isCopyOnWrite()) {
HeapPtrNativeObject &owner = header->ownerObject();
if (IsForwarded(owner.get()))
owner = Forwarded(owner.get());
owner = MaybeForwarded(owner.get());
as<NativeObject>().elements_ = owner->getElementsHeader()->elements();
}
}