Closed Bug 1442377 Opened 2 years ago Closed 2 years ago
Unused variables (fill
Subview From Menu Items/clear Subview) reported for Customizable Widgets .jsm
59 bytes, text/x-review-board-request
When running ESLint's no-unused-vars rule in global scope mode (as we're working on in bug 1434446), we currently get this report: browser/components/customizableui/CustomizableWidgets.jsm 78:10 error 'fillSubviewFromMenuItems' is defined but never used. Allowed unused vars must match /^EXPORTED_SYMBOLS$/. no-unused-vars (eslint) 136:10 error 'clearSubview' is defined but never used. Allowed unused vars must match /^EXPORTED_SYMBOLS$/. no-unused-vars (eslint) These functions are imported via the backdoor import route into devtools/shim/devtools-startup.js: https://searchfox.org/mozilla-central/rev/769222fadff46164f8cc0dc7a0bae5a60dc2f335/devtools/shim/devtools-startup.js#400-404 This hidden export is non-obvious to ESLint and to readers of CustomizableWidgets.jsm, so we should improve it. Talking to Gijs on irc, we think we should move these to the CustomizableUI object, and have them included in that object.
Comment on attachment 8955280 [details] Bug 1442377 - Move fillSubviewFromMenuItems/clearSubview to CustomizableUI.jsm. https://reviewboard.mozilla.org/r/224430/#review230382 Hm, I didn't realize this was unused... Can you file a followup to use this for the help menu as well? See `_onHelpViewShow` in PanelUI. If that's not obviously possible, really it'd be better to move the helper into devtools itself...
Attachment #8955280 - Flags: review?(gijskruitbosch+bugs) → review+
I filed bug 1442388.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/30b45ad3b81a Move fillSubviewFromMenuItems/clearSubview to CustomizableUI.jsm. r=Gijs
You need to log in before you can comment on or make changes to this bug.