Bug 1489820 - Don't handle locale changes on shutdown. r=zbraniecki
authorMichael Kaply <mozilla@kaply.com>
Mon, 10 Sep 2018 20:52:15 +0000
changeset 435526 7b0d4ede690a
parent 435525 510225640144
child 435527 d92fe9ca503c
push id69039
push usermozilla@kaply.com
push dateMon, 10 Sep 2018 21:08:21 +0000
treeherderautoland@7b0d4ede690a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerszbraniecki
bugs1489820
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1489820 - Don't handle locale changes on shutdown. r=zbraniecki 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");