Bug 460117 - TM: Inconsistent results from hasOwnProperty with JIT enabled. r=brendan.

This commit is contained in:
Jason Orendorff 2008-10-21 13:19:22 -05:00
parent 7a64f4c532
commit 42e29cfd46

View File

@ -1560,8 +1560,11 @@ js_HasOwnProperty(JSContext *cx, JSLookupPropOp lookup, JSObject *obj, jsid id,
static int32 FASTCALL
Object_p_hasOwnProperty(JSContext* cx, JSObject* obj, JSString *str)
{
jsid id = ATOM_TO_JSID(STRING_TO_JSVAL(str));
jsid id;
jsval v;
if (!js_ValueToStringId(cx, STRING_TO_JSVAL(str), &id))
return JSVAL_TO_BOOLEAN(JSVAL_VOID);
if (!js_HasOwnProperty(cx, obj->map->ops->lookupProperty, obj, id, &v))
return JSVAL_TO_BOOLEAN(JSVAL_VOID);
JS_ASSERT(JSVAL_IS_BOOLEAN(v));