Fix
bug 423043, js shell print() should flush stdout. r+a=shaver. Does not affect Firefox.
--- a/js/src/js.c
+++ b/js/src/js.c
@@ -753,17 +753,20 @@ Print(JSContext *cx, JSObject *obj, uint
if (!str)
return JS_FALSE;
bytes = JS_EncodeString(cx, str);
if (!bytes)
return JS_FALSE;
fprintf(gOutFile, "%s%s", i ? " " : "", bytes);
JS_free(cx, bytes);
}
+
fputc('\n', gOutFile);
+ fflush(gOutFile);
+
return JS_TRUE;
}
static JSBool
Help(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
static JSBool
Quit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)