From 8095bde7d52d69e0026dd209475994608a59a3b4 Mon Sep 17 00:00:00 2001 From: Bob Owen Date: Wed, 18 Oct 2017 12:04:53 +0100 Subject: [PATCH] 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 | 1 + toolkit/components/satchel/satchel.manifest | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/components/satchel/FormHistoryStartup.js b/toolkit/components/satchel/FormHistoryStartup.js index 8c41ace310be..3ad1010e092b 100644 --- a/toolkit/components/satchel/FormHistoryStartup.js +++ b/toolkit/components/satchel/FormHistoryStartup.js @@ -52,6 +52,7 @@ FormHistoryStartup.prototype = { // 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); diff --git a/toolkit/components/satchel/satchel.manifest b/toolkit/components/satchel/satchel.manifest index 0dba85473ef9..a435f780b4ab 100644 --- a/toolkit/components/satchel/satchel.manifest +++ b/toolkit/components/satchel/satchel.manifest @@ -5,4 +5,3 @@ contract @mozilla.org/satchel/inputlist-autocomplete;1 {bf1e01d0-953e-11df-981c- 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