Assert that JSVAL_ERROR_COOKIE doesn't leak from the JIT into the interpreter (r=me, debug only).
Assert that JSVAL_ERROR_COOKIE doesn't leak from the JIT into the interpreter (r=me, debug only).
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1587,16 +1587,17 @@ NativeToValue(JSContext* cx, jsval& v, u
JS_ASSERT(*(JSObject**)slot == NULL);
v = JSVAL_NULL;
debug_only_v(printf("null<%p> ", *(JSObject**)slot));
break;
default:
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"
: STOBJ_GET_CLASS(JSVAL_TO_OBJECT(v))->name);)
break;
}
}