Bug 677194 - Change assertion to an early-return bailout. r=jst, a=akeybl

This commit is contained in:
Josh Matthews 2012-02-29 12:11:03 -05:00
parent a4640d7b1b
commit c119292173

View File

@ -6100,7 +6100,10 @@ nsDOMConstructor::HasInstance(nsIXPConnectWrappedNative *wrapper,
return NS_ERROR_UNEXPECTED;
}
JS_ASSERT(!JSVAL_IS_PRIMITIVE(val));
if (JSVAL_IS_PRIMITIVE(val)) {
return NS_OK;
}
JSObject *dot_prototype = JSVAL_TO_OBJECT(val);
JSObject *proto = JS_GetPrototype(dom_obj);