JS_ReportError(cx, "no input for /%s/%s%s",
JS_ReportErrorNumber(cx, NULL, JSMSG_NO_INPUT,
regexp_exec_sub(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,		JSBool test, jsval *rval){    JSBool ok, locked;    JSRegExp *re;    JSString *str;    size_t i;    if (!JS_InstanceOf(cx, obj, &js_RegExpClass, argv))	return JS_FALSE;    re = JS_GetPrivate(cx, obj);    if (!re)    	return JS_TRUE;    ok = locked = JS_FALSE;    if (argc == 0) {	str = cx->regExpStatics.input;	if (!str) {	    JS_ReportError(cx, "no input for /%s/%s%s",			   JS_GetStringBytes(re->source),			   (re->flags & JSREG_GLOB) ? "g" : "",			   (re->flags & JSREG_FOLD) ? "i" : "");	    goto out;	}    } else {	str = js_ValueToString(cx, argv[0]);	if (!str)	    goto out;	argv[0] = STRING_TO_JSVAL(str);    }    if (re->flags & JSREG_GLOB) {	JS_LOCK_OBJ(cx, obj);	locked = JS_TRUE;	i = re->lastIndex;    } else {	i = 0;    }    ok = js_ExecuteRegExp(cx, re, str, &i, test, rval);    if (re->flags & JSREG_GLOB)	re->lastIndex = (*rval == JSVAL_NULL) ? 0 : i;out:    if (locked)	JS_UNLOCK_OBJ(cx, obj);    return ok;}