Don't mark descriptor obj if it is NULL (567387, r=jorendorff).

This commit is contained in:
Andreas Gal 2010-05-21 10:37:56 -07:00
parent 40d0fb0842
commit fd6436223d

View File

@ -246,7 +246,8 @@ AutoGCRooter::trace(JSTracer *trc)
case DESCRIPTOR : {
AutoDescriptor &desc = *static_cast<AutoDescriptor *>(this);
JS_CALL_OBJECT_TRACER(trc, desc.obj, "Descriptor::obj");
if (desc.obj)
JS_CALL_OBJECT_TRACER(trc, desc.obj, "Descriptor::obj");
JS_CALL_VALUE_TRACER(trc, desc.value, "Descriptor::value");
if (desc.attrs & JSPROP_GETTER)
JS_CALL_VALUE_TRACER(trc, jsval(desc.getter), "Descriptor::get");