MD Settings: search-engines-changed event sometimes fires twice |
|||
Issue descriptionThis is not causing a user visible bug, AFAIK, but it does cause unnecessary work to be performed both in C++ and JS (and also happens in old Options). Explaining below: - SearchEnginesHandler is an observer of TemplateURLTableModel, see [1]. - When the user changes the default search engine to another one, the onItemsChanged() observer callback is fired twice, once for the previous default engine and once for the new one, see [2]. - Upon receiving this notification, SearchEnginesHandler blindly fires a new 'search-engines-changed' event to the UI. [1] https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/search_engines_handler.cc?l=137 [2] https://cs.chromium.org/chromium/src/chrome/browser/ui/search_engines/template_url_table_model.cc?l=343,346 [3] https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/search_engines_handler.cc?l=207 I could not find a good way of filtering out one of the two calls, since the same onItemsChanged() callback is fired when any search engine is edited.
,
May 18 2017
,
May 21 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||
►
Sign in to add a comment |
|||
Comment 1 by dbeam@chromium.org
, Mar 6 2017Status: Available (was: Untriaged)