Fix jsreftest regress-520572.js

This commit is contained in:
David Mandelin 2010-05-25 14:54:16 -07:00
parent 6aeb545a8a
commit 9283167963

View File

@ -2681,7 +2681,7 @@ JS_PUBLIC_API(JSBool)
JS_SetParent(JSContext *cx, JSObject *obj, JSObject *parent)
{
CHECK_REQUEST(cx);
JS_ASSERT(!parent->isFunction() &&
JS_ASSERT((!parent || !parent->isFunction()) &&
"Functions may not be set as the parents of objects.");
return js_SetProtoOrParent(cx, obj, JSSLOT_PARENT, parent, JS_FALSE);
}