Bug 613516 - xpcshell dump doesn't print newlines. r=jorendorff, a=blocking
☠☠ backed out by e96da44dcae1 ☠ ☠
authorIgor Bukanov <igor@mir2.org>
Mon, 29 Nov 2010 13:27:27 -0800
changeset 58345 650ad3cd7e520eb93ba73ecedc40212d4c81efb0
parent 58344 eaecf12fbf6edd451ef2fbdd8ae431f5ccd94e63
child 58346 345dd13d047bfba2d3796e72779627d1771e1625
child 58350 e96da44dcae1fa8c1756a13adad00f6d84fc73a3
push id17254
push usermargaret.leibovic@gmail.com
push dateMon, 29 Nov 2010 21:29:47 +0000
treeherdermozilla-central@650ad3cd7e52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff, blocking
bugs613516
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 613516 - xpcshell dump doesn't print newlines. r=jorendorff, a=blocking
js/src/xpconnect/shell/xpcshell.cpp
--- a/js/src/xpconnect/shell/xpcshell.cpp
+++ b/js/src/xpconnect/shell/xpcshell.cpp
@@ -444,17 +444,21 @@ Dump(JSContext *cx, uintN argc, jsval *v
     JSString *str;
     if (!argc)
         return JS_TRUE;
 
     str = JS_ValueToString(cx, JS_ARGV(cx, vp)[0]);
     if (!str)
         return JS_FALSE;
 
-    JS_FileEscapedString(gOutFile, str, 0);
+    JSAutoByteString bytes(cx, str);
+    if (!bytes)
+        return JS_FALSE;
+    
+    fputs(bytes.ptr(), gOutFile);
     fflush(gOutFile);
     return JS_TRUE;
 }
 
 static JSBool
 Load(JSContext *cx, uintN argc, jsval *vp)
 {
     uintN i;