Bug 1489820 - Don't handle locale changes on shutdown. r=gandalf a=RyanVM
authorMichael Kaply <mozilla@kaply.com>
Mon, 10 Sep 2018 20:52:15 +0000
changeset 489805 992b31153c1f
parent 489804 2676e5311258
child 489806 cae2f8c62a2a
push id9787
push usernbeleuzu@mozilla.com
push dateTue, 11 Sep 2018 18:32:32 +0000
treeherdermozilla-beta@992b31153c1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgandalf, RyanVM
bugs1489820
milestone63.0
Bug 1489820 - Don't handle locale changes on shutdown. r=gandalf a=RyanVM 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
@@ -4451,17 +4451,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");