Closed
Bug 1809124
Opened 2 years ago
Closed 2 years ago
Simplify custom formatters actor implementation
Categories
(DevTools :: Framework, task)
DevTools
Framework
Tracking
(firefox110 fixed)
RESOLVED
FIXED
110 Branch
Tracking | Status | |
---|---|---|
firefox110 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
We could:
- lazy load this code in order to only load the formatter's code only if this feature is enabled
- move this code to a dedicated module as this is quite different from the rest of ObjectActor and is quite complex logic
- Factorize some code related to error logging
- Early return to reduce function nesting size
- By doing early return we may more consistantly process error first
Assignee | ||
Comment 1•2 years ago
|
||
This help lazy load this significant code only if this feature is used.
Updated•2 years ago
|
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•2 years ago
|
||
- Use FormatterError exception to factorize the code to log formatter errors and ignore them
- Use one seperate function to process a single formatter to simplify the loop comprehension
- Use early return in both function to reduce the nesting of functions,
and also process error first. This helps processFormatterForHeader process all errors first.
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7af2fb02b518
[devtools] Move server side custom formatter logic to a dedicated module. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/c109c45212af
[devtools] Simplify the implementation of custom formatter actor. r=nchevobbe
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7af2fb02b518
https://hg.mozilla.org/mozilla-central/rev/c109c45212af
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox110:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•