Closed Bug 929824 Opened 6 years ago Closed 6 years ago

Debugger logging not pretty printed when remote end not logging

Categories

(DevTools :: Framework, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: jryans, Assigned: jryans)

Details

Attachments

(1 file)

After the change in bug 923600, if you use a client with debugger logging enabled to connect a server with logging disabled, you no longer see pretty printed messages on the client.
This changes the previous patch from bug 923600 so we never pretty print over the wire, but if and only if the receiver is logging, then pretty print for them.
Attachment #820744 - Flags: review?(rcampbell)
Summary: Debugger client logging no longer pretty printed → Debugger logging not pretty printed when remote end not logging
This calls JSON.stringify (and wantLogging) twice though, right?

I guess it's a good tradeoff to make the local case with debug enabled slower, if this ends up making the remote case with debug disabled faster.
Comment on attachment 820744 [details] [diff] [review]
Pretty print RDP on receive

Review of attachment 820744 [details] [diff] [review]:
-----------------------------------------------------------------

ok.

Nick just changed this in bug 923600.

I'm not a huge fan of stringifying more than once here, but don't have a good suggestion on how to ensure received packets that weren't pretty-printed get reformatted correctly.
Attachment #820744 - Flags: review?(rcampbell) → review+
The non-logging case is still as fast as possible: sender does a single stringify w/o indenting, and the receiver parses.

If you're logging, the receiver additionally stringifies with indenting.  So, I think it's a reasonable tradeoff, especially since the side that will actually be printing controls whether the indenting happens.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7688cf08e31d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 27
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.