Backed out changeset 6d73cc06f9fe (
bug 650161) for SM(ggc) timeouts.
CLOSED TREE
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -2193,26 +2193,25 @@ RelocateCell(Zone *zone, TenuredCell *sr
// Copy source cell contents to destination.
memcpy(dst, src, thingSize);
if (thingKind <= FINALIZE_OBJECT_LAST) {
JSObject *srcObj = static_cast<JSObject *>(static_cast<Cell *>(src));
JSObject *dstObj = static_cast<JSObject *>(static_cast<Cell *>(dst));
// Fixup the pointer to inline object elements if necessary.
- if (srcObj->isNative() && srcObj->as<NativeObject>().hasFixedElements())
- dstObj->as<NativeObject>().setFixedElements();
+ if (srcObj->hasFixedElements())
+ dstObj->setFixedElements();
// Call object moved hook if present.
if (JSObjectMovedOp op = srcObj->getClass()->ext.objectMovedOp)
op(dstObj, srcObj);
MOZ_ASSERT_IF(dstObj->isNative(),
- !PtrIsInRange((const Value*)dstObj->as<NativeObject>().getDenseElements(),
- src, thingSize));
+ !PtrIsInRange((const Value*)dstObj->getDenseElements(), src, thingSize));
}
// Copy the mark bits.
dst->copyMarkBitsFrom(src);
// Mark source cell as forwarded and leave a pointer to the destination.
RelocationOverlay* overlay = RelocationOverlay::fromCell(src);
overlay->forwardTo(dst);