Bug 564763 ReservedSlotIndexOK and js_GetReservedSlot-limit are unused in nondebug builds

r=jorendorff

--HG--
extra : rebase_source : 417ac35e2aefbfe029dae891d551c71ef456712e
This commit is contained in:
timeless@mozdev.org 2010-07-07 17:22:26 +03:00
parent 32ea0e50a5
commit 13b3346876

View File

@ -6202,6 +6202,7 @@ js_Clear(JSContext *cx, JSObject *obj)
JS_UNLOCK_OBJ(cx, obj);
}
#ifdef DEBUG
/* On failure the function unlocks the object. */
static bool
ReservedSlotIndexOK(JSContext *cx, JSObject *obj, JSClass *clasp,
@ -6220,6 +6221,7 @@ ReservedSlotIndexOK(JSContext *cx, JSObject *obj, JSClass *clasp,
}
return true;
}
#endif
bool
js_GetReservedSlot(JSContext *cx, JSObject *obj, uint32 index, jsval *vp)
@ -6230,7 +6232,9 @@ js_GetReservedSlot(JSContext *cx, JSObject *obj, uint32 index, jsval *vp)
}
JSClass *clasp = obj->getClass();
#ifdef DEBUG
uint32 limit = JSCLASS_RESERVED_SLOTS(clasp);
#endif
JS_LOCK_OBJ(cx, obj);
JS_ASSERT(index < limit || ReservedSlotIndexOK(cx, obj, clasp, index, limit));