Bug 923600 - don't pretty print RDP packets when devtools.debugger.log is false; r=robcee
☠☠ backed out by 6dda6589a777 ☠ ☠
authorNick Fitzgerald <fitzgen@gmail.com>
Fri, 04 Oct 2013 15:38:22 -0700
changeset 149889 0addc6532f622e35c654113944f9588d87396f43
parent 149888 316f52f8d144e8a762c7b6b60aa8742aa62def7a
child 149890 4495d63770f993d1d0cc4e2b6fc4befc409ccadc
push id2939
push usernfitzgerald@mozilla.com
push dateFri, 04 Oct 2013 22:43:17 +0000
treeherderfx-team@0addc6532f62 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobcee
bugs923600
milestone27.0a1
Bug 923600 - don't pretty print RDP packets when devtools.debugger.log is false; r=robcee
toolkit/devtools/server/transport.js
--- a/toolkit/devtools/server/transport.js
+++ b/toolkit/devtools/server/transport.js
@@ -61,18 +61,19 @@ DebuggerTransport.prototype = {
    * Transmit a packet.
    *
    * This method returns immediately, without waiting for the entire
    * packet to be transmitted, registering event handlers as needed to
    * transmit the entire packet. Packets are transmitted in the order
    * they are passed to this method.
    */
   send: function DT_send(aPacket) {
-    // TODO (bug 709088): remove pretty printing when the protocol is done.
-    let data = JSON.stringify(aPacket, null, 2);
+    let data = wantLogging
+      ? JSON.stringify(aPacket, null, 2)
+      : JSON.stringify(aPacket);
     data = this._converter.ConvertFromUnicode(data);
     data = data.length + ':' + data;
     this._outgoing += data;
     this._flushOutgoing();
   },
 
   /**
    * Close the transport.