Assert that JSVAL_ERROR_COOKIE doesn't leak from the JIT into the interpreter (r=me, debug only).

This commit is contained in:
Andreas Gal 2009-02-01 23:16:00 -08:00
parent 1bd89e55b9
commit b64966b336

View File

@ -1592,6 +1592,7 @@ NativeToValue(JSContext* cx, jsval& v, uint8 type, double* slot)
JS_ASSERT(type == JSVAL_OBJECT);
v = OBJECT_TO_JSVAL(*(JSObject**)slot);
JS_ASSERT(JSVAL_TAG(v) == JSVAL_OBJECT); /* if this fails the pointer was not aligned */
JS_ASSERT(v != JSVAL_ERROR_COOKIE); /* don't leak JSVAL_ERROR_COOKIE */
debug_only_v(printf("object<%p:%s> ", JSVAL_TO_OBJECT(v),
JSVAL_IS_NULL(v)
? "null"