mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 923600 - don't pretty print RDP packets when devtools.debugger.log is false; r=robcee
This commit is contained in:
parent
681cf82bdb
commit
9d1738c70b
@ -7,6 +7,8 @@
|
||||
"use strict";
|
||||
Components.utils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
let wantLogging = Services.prefs.getBoolPref("devtools.debugger.log");
|
||||
|
||||
/**
|
||||
* An adapter that handles data transfers between the debugger client and
|
||||
* server. It can work with both nsIPipe and nsIServerSocket transports so
|
||||
@ -66,8 +68,9 @@ DebuggerTransport.prototype = {
|
||||
* 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;
|
||||
|
Loading…
Reference in New Issue
Block a user