Bug 640375: Fix CTypes marking code compartment assertion. (r=mrbkap)

This commit is contained in:
Chris Leary 2011-03-21 09:55:19 -07:00
parent bb37566667
commit 49a0071d4a

View File

@ -2763,7 +2763,7 @@ CType::Trace(JSTracer* trc, JSObject* obj)
// The contents of our slots depends on what kind of type we are. // The contents of our slots depends on what kind of type we are.
switch (TypeCode(JSVAL_TO_INT(slot))) { switch (TypeCode(JSVAL_TO_INT(slot))) {
case TYPE_struct: { case TYPE_struct: {
ASSERT_OK(JS_GetReservedSlot(cx, obj, SLOT_FIELDINFO, &slot)); slot = Jsvalify(obj->getReservedSlot(SLOT_FIELDINFO));
if (JSVAL_IS_VOID(slot)) if (JSVAL_IS_VOID(slot))
return; return;
@ -2778,7 +2778,7 @@ CType::Trace(JSTracer* trc, JSObject* obj)
} }
case TYPE_function: { case TYPE_function: {
// Check if we have a FunctionInfo. // Check if we have a FunctionInfo.
ASSERT_OK(JS_GetReservedSlot(cx, obj, SLOT_FNINFO, &slot)); slot = Jsvalify(obj->getReservedSlot(SLOT_FNINFO));
if (JSVAL_IS_VOID(slot)) if (JSVAL_IS_VOID(slot))
return; return;