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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user