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 id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersjorendorff, blocking
bugs613516
milestone2.0b8pre
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;