Bug 1489820 - Don't handle locale changes on shutdown. r=zbraniecki, a=jcristau
authorMichael Kaply <mozilla@kaply.com>
Mon, 10 Sep 2018 20:52:15 +0000
changeset 481141 f6d4c25645ce
parent 481140 25a6fa67de8d
child 481142 5e2fe8c6f242
push id1786
push userjcristau@mozilla.com
push dateWed, 19 Sep 2018 13:14:52 +0000
treeherdermozilla-release@0a1434f27587 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerszbraniecki, jcristau
bugs1489820
milestone62.0.2
Bug 1489820 - Don't handle locale changes on shutdown. r=zbraniecki, a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D5466
toolkit/components/search/nsSearchService.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -4513,17 +4513,20 @@ SearchService.prototype = {
       case QUIT_APPLICATION_TOPIC:
         this._removeObservers();
         break;
 
       case TOPIC_LOCALES_CHANGE:
         // Locale changed. Re-init. We rely on observers, because we can't
         // return this promise to anyone.
         // FYI, This is also used by the search tests to do an async reinit.
-        this._asyncReInit();
+        // Locales are removed during shutdown, so ignore this message
+        if (!Services.startup.shuttingDown) {
+          this._asyncReInit();
+        }
         break;
     }
   },
 
   // nsITimerCallback
   notify: function SRCH_SVC_notify(aTimer) {
     LOG("_notify: checking for updates");