Bug 613516 - xpcshell dump doesn't print newlines. r=jorendorff, a=blocking
authorIgor Bukanov <igor@mir2.org>
Mon, 29 Nov 2010 13:27:27 -0800
changeset 58357 9231797ba1062b8fc8138389e4439307541a7dd5
parent 58356 0bb90b42a363d2383fd8603e35b44b6cea8bd63e
child 58358 d1fe3a682617a286f7d25e4aef53cdab9165cd44
push id17262
push usereakhgari@mozilla.com
push dateTue, 30 Nov 2010 01:57:58 +0000
treeherdermozilla-central@d1fe3a682617 [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;