Bug 1372823 Part 4: Set-up observer for idle-daily in FormHistoryStartup.init not manifest. r=mak
authorBob Owen <bobowencode@gmail.com>
Wed, 18 Oct 2017 12:04:53 +0100
changeset 386978 f8094e7cb5155a9524c4783b9727cd8bc63e6219
parent 386977 b2f92ccf6938b766d129e00c205a5a46451fb414
child 386979 13bd66ee725ea7f94c8fc48d13e8a601d149abb1
push id32705
push userryanvm@gmail.com
push dateThu, 19 Oct 2017 01:01:49 +0000
treeherdermozilla-central@a21099ce055f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1372823
milestone58.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 1372823 Part 4: Set-up observer for idle-daily in FormHistoryStartup.init not manifest. r=mak This is so that we don't open a database connection without any of the machinery in place to close it.
toolkit/components/satchel/FormHistoryStartup.js
toolkit/components/satchel/satchel.manifest
--- a/toolkit/components/satchel/FormHistoryStartup.js
+++ b/toolkit/components/satchel/FormHistoryStartup.js
@@ -47,16 +47,17 @@ FormHistoryStartup.prototype = {
       return;
     }
     this.inited = true;
 
     Services.prefs.addObserver("browser.formfill.", this, true);
 
     // triggers needed service cleanup and db shutdown
     Services.obs.addObserver(this, "profile-before-change", true);
+    Services.obs.addObserver(this, "idle-daily", true);
     Services.obs.addObserver(this, "formhistory-expire-now", true);
 
     Services.ppmm.loadProcessScript("chrome://satchel/content/formSubmitListener.js", true);
     Services.ppmm.addMessageListener("FormHistory:FormSubmitEntries", this);
 
     let messageManager = Cc["@mozilla.org/globalmessagemanager;1"]
                          .getService(Ci.nsIMessageListenerManager);
     // For each of these messages, we could receive them from content,
--- a/toolkit/components/satchel/satchel.manifest
+++ b/toolkit/components/satchel/satchel.manifest
@@ -1,8 +1,7 @@
 component {c11c21b2-71c9-4f87-a0f8-5e13f50495fd} nsFormAutoComplete.js
 contract @mozilla.org/satchel/form-autocomplete;1 {c11c21b2-71c9-4f87-a0f8-5e13f50495fd}
 component {bf1e01d0-953e-11df-981c-0800200c9a66} nsInputListAutoComplete.js
 contract @mozilla.org/satchel/inputlist-autocomplete;1 {bf1e01d0-953e-11df-981c-0800200c9a66}
 component {3a0012eb-007f-4bb8-aa81-a07385f77a25} FormHistoryStartup.js
 contract @mozilla.org/satchel/form-history-startup;1 {3a0012eb-007f-4bb8-aa81-a07385f77a25}
 category profile-after-change formHistoryStartup @mozilla.org/satchel/form-history-startup;1
-category idle-daily formHistoryStartup @mozilla.org/satchel/form-history-startup;1