diff --git a/mozilla/js/src/xpconnect/shell/xpcshell.cpp b/mozilla/js/src/xpconnect/shell/xpcshell.cpp index 7b5b471af12..d86ae37796f 100644 --- a/mozilla/js/src/xpconnect/shell/xpcshell.cpp +++ b/mozilla/js/src/xpconnect/shell/xpcshell.cpp @@ -964,6 +964,10 @@ main(int argc, char **argv, char **envp) int result; nsresult rv; + // unbuffer stdout so that output is in the correct order; note that stderr + // is unbuffered by default + setbuf(stdout, 0); + gErrFile = stderr; gOutFile = stdout; {