if (ok)
if (ok) {
sort_compare(const void *a, const void *b, void *arg){    jsval av = *(const jsval *)a, bv = *(const jsval *)b;    CompareArgs *ca = arg;    JSContext *cx = ca->context;    jsdouble cmp = -1;    jsval fval, argv[2], rval;    JSBool ok;    fval = ca->fval;    if (fval == JSVAL_NULL) {	JSString *astr, *bstr;	if (av == bv) {	    cmp = 0;	} else if (av == JSVAL_VOID || bv == JSVAL_VOID) {	    /* Put undefined properties at the end. */	    cmp = (av == JSVAL_VOID) ? 1 : -1;	} else if ((astr = js_ValueToString(cx, av)) != NULL &&		   (bstr = js_ValueToString(cx, bv)) != NULL) {	    cmp = js_CompareStrings(astr, bstr);	} else {	    ca->status = JS_FALSE;	}    } else {	argv[0] = av;	argv[1] = bv;	ok = js_CallFunctionValue(cx,				  OBJ_GET_PARENT(cx, JSVAL_TO_OBJECT(fval)),				  fval, 2, argv, &rval);	if (ok)	    ok = js_ValueToNumber(cx, rval, &cmp);	if (!ok)	    ca->status = ok;    }    return (int)cmp;}