Open Bug 611749 Opened 15 years ago Updated 3 years ago

Replace non-specialized searches through array-likes in toolkit with core JS methods

Categories

(Toolkit :: UI Widgets, defect)

defect

Tracking

()

People

(Reporter: crussell, Unassigned)

Details

Menu and menulists, for example, implement getIndexOfItem as a hand-coded linear search: http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/menu.xml#119 http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/menulist.xml#279 The loops there should just be replaced by return Array.indexOf(items); If possible, we should perform some kind of analysis to find similar patterns.
Severity: trivial → S4
You need to log in before you can comment on or make changes to this bug.