Closed Bug 1442377 Opened 6 years ago Closed 6 years ago

Unused variables (fillSubviewFromMenuItems/clearSubview) reported for CustomizableWidgets.jsm

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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+
Blocks: 1442388
I filed bug 1442388.
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/30b45ad3b81a
Move fillSubviewFromMenuItems/clearSubview to CustomizableUI.jsm. r=Gijs
https://hg.mozilla.org/mozilla-central/rev/30b45ad3b81a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: