Closed Bug 1193197 Opened 9 years ago Closed 9 years ago

Server side logging: get rid of splitLogs and specifiers variables

Categories

(DevTools :: Console, defect)

42 Branch
defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
Firefox 43
Tracking Status
firefox43 --- fixed

People

(Reporter: Honza, Assigned: fayolle-florent)

References

Details

Attachments

(1 file)

The code that is responsible for parsing HTTP headers looks unnecessary complex as it is splitted in two steps. It will be much easier if you combine both steps, i.e. building the concatenated string directly from one loop.

Also, this feature is already implemented in the webconsole. Couldn't we just pass the printf-like string as-is and let the existing console code do this work?
Or, couldn't we at least share the code?

Honza
I take it.
Assignee: nobody → fayolle-florent
Status: NEW → ASSIGNED
Attached patch 1193197.patchSplinter Review
Alex, here are the optimizations you asked for. Note that I plan to look for a way to expose the Console::processArguments function (C++ side) to avoid the code duplication (and therefore get rid of the format() function).

Florent
Attachment #8657562 - Flags: review?(poirot.alex)
Comment on attachment 8657562 [details] [diff] [review]
1193197.patch

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

Looks good, thanks!
Attachment #8657562 - Flags: review?(poirot.alex) → review+
Are you able to push to try?
Flags: needinfo?(fayolle-florent)
Yep. I just had to rebase a bit my work and recompile.

The try-push is here (in progress): https://treeherder.mozilla.org/#/jobs?repo=try&revision=5a4d1966b360

Florent
Flags: needinfo?(fayolle-florent)
Asking for check-in after the try-push. Looks like there is no regression.

Florent
Keywords: checkin-needed
Please add the patch onto the bug if you've had to rebase it. It helps us sheriffs when we need to land checkin-needed bugs :)
https://hg.mozilla.org/mozilla-central/rev/6d3465f4aa24
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: