зеркало из https://github.com/mozilla/gecko-dev.git
Bug 923600 - don't pretty print RDP packets when devtools.debugger.log is false; r=robcee
This commit is contained in:
Родитель
681cf82bdb
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче