From 026c282e350f5401cd16a589fbfb92cde0023257 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Wed, 20 Apr 2016 16:14:11 +0100 Subject: [PATCH] Bug 1265679 - Always call the object moved hook in generational GC r=terrence --- js/src/gc/Marking.cpp | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index 756116834510..c97412ec992c 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -2276,20 +2276,18 @@ js::TenuringTracer::moveObjectToTenured(JSObject* dst, JSObject* src, AllocKind } } - if (src->getClass()->flags & JSCLASS_SKIP_NURSERY_FINALIZE) { - if (src->is()) { - InlineTypedObject::objectMovedDuringMinorGC(this, dst, src); - } else if (src->is()) { - tenuredSize += UnboxedArrayObject::objectMovedDuringMinorGC(this, dst, src, dstKind); - } else if (src->is()) { - tenuredSize += ArgumentsObject::objectMovedDuringMinorGC(this, dst, src); - } else if (JSObjectMovedOp op = dst->getClass()->extObjectMovedOp()) { - op(dst, src); - } else { - // Objects with JSCLASS_SKIP_NURSERY_FINALIZE need to be handled above - // to ensure any additional nursery buffers they hold are moved. - MOZ_CRASH("Unhandled JSCLASS_SKIP_NURSERY_FINALIZE Class"); - } + if (src->is()) { + InlineTypedObject::objectMovedDuringMinorGC(this, dst, src); + } else if (src->is()) { + tenuredSize += UnboxedArrayObject::objectMovedDuringMinorGC(this, dst, src, dstKind); + } else if (src->is()) { + tenuredSize += ArgumentsObject::objectMovedDuringMinorGC(this, dst, src); + } else if (JSObjectMovedOp op = dst->getClass()->extObjectMovedOp()) { + op(dst, src); + } else if (src->getClass()->flags & JSCLASS_SKIP_NURSERY_FINALIZE) { + // Objects with JSCLASS_SKIP_NURSERY_FINALIZE need to be handled above + // to ensure any additional nursery buffers they hold are moved. + MOZ_CRASH("Unhandled JSCLASS_SKIP_NURSERY_FINALIZE Class"); } return tenuredSize;