Open
Bug 1487442
Opened 6 years ago
Updated 2 years ago
Update highlighter instantiation methods to have clearer naming
Categories
(DevTools :: Inspector, enhancement, P3)
Tracking
(Not tracked)
NEW
People
(Reporter: yulia, Unassigned)
References
Details
After https://bugzilla.mozilla.org/show_bug.cgi?id=1447490, we will move to using the inspector front for managing the creation and destruction of highlighters. At the moment we do it several ways here on the server we do it for the eyedropper https://searchfox.org/mozilla-central/source/devtools/server/actors/inspector/inspector.js#269 and here is what we do in highlighters-overlay: https://searchfox.org/mozilla-central/source/devtools/client/inspector/shared/highlighters-overlay.js#924-933 note we are not destroying in the second case, we are just forgetting about them. The "getHighlighterByType" method is always returning a new highlighter. But this doesn't make sense with the verb "get". It should be "create". The memoized function, currently called "getOrCreateHighlighterByType" should be renamed to "getHighlighterByType".
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•