From e1471231ec32041c3caed46471d957c81b687ed0 Mon Sep 17 00:00:00 2001 From: Blake Kaplan Date: Tue, 11 Jan 2011 17:01:10 -0800 Subject: [PATCH] Bug 624540 - Assertion failure: compartment mismatch in cycle collector during xpcom-shutdown. r=gal, a=blocking2.0+ --- js/src/ctypes/CTypes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index c14c5755a4b..3a0513fa129 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -2756,8 +2756,8 @@ CType::Trace(JSTracer* trc, JSObject* obj) JSContext* cx = trc->context; // Make sure our TypeCode slot is legit. If it's not, bail. - jsval slot; - if (!JS_GetReservedSlot(cx, obj, SLOT_TYPECODE, &slot) || JSVAL_IS_VOID(slot)) + jsval slot = js::Jsvalify(obj->getSlot(SLOT_TYPECODE)); + if (JSVAL_IS_VOID(slot)) return; // The contents of our slots depends on what kind of type we are.