Bug 613516 - xpcshell dump doesn't print newlines. r=jorendorff, a=blocking
☠☠ backed out by 06b0d2314348 ☠ ☠
authorIgor Bukanov <igor@mir2.org>
Mon, 29 Nov 2010 13:27:27 -0800
changeset 59365 3ae7ac6aefd17cdc98c73c2e24dfecaf0de5c85d
parent 59364 1893bbaa35620e768f99748081337449c8ae7832
child 59366 06b0d231434814805a6955a7b67b59e0ca4d7fba
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;