The code in browser/components/preferences/in-content/search.js is inherited from the old preference dialog that had apply/ok/cancel buttons. Now that all changes apply instantly, a lot of the complexity can be removed. More specifically, I think the EngineStore object (used to store local copies of the engines) isn't needed anymore. Unfortunately, removing it isn't a simple code removal, and refactoring of the code in the rest of the file will be needed. This preference pane also needs better test coverage, as for example it shouldn't have been possible to introduce a regression like bug 1327953 and discover it only 5 releases later.
Note, the "search" pane of preferences is planned to get merged with the "general" pane as part of bug 1335907. Work here should probably wait until bug 1335907 lands.
You need to log in before you can comment on or make changes to this bug.