js_obj_hasOwnProperty is supposed to return a boolean but was incorrectly generating code to return a number, resulting on a failure in the boolean comparison due to an unexpected i2f (450304).

This commit is contained in:
Andreas Gal
2008-08-12 14:28:15 -07:00
parent 155f960561
commit abf0c891fd
2 changed files with 5 additions and 3 deletions

View File

@@ -465,7 +465,7 @@ js_Object_p_hasOwnProperty(JSContext* cx, JSObject* obj, JSString *str)
{
jsval v;
if (!js_HasOwnProperty(cx, obj->map->ops->lookupProperty, obj, ATOM_TO_JSID(str), &v))
return -1;
return JSVAL_TO_BOOLEAN(JSVAL_VOID);
JS_ASSERT(JSVAL_IS_BOOLEAN(v));
return JSVAL_TO_BOOLEAN(v);
}