Bug 849947 - Flush preferences after FHR document submission; r=glandium, rnewman

This commit is contained in:
Gregory Szorc 2013-03-15 13:19:38 -07:00
parent 8ebc7e5f30
commit 018a85ed75
2 changed files with 17 additions and 0 deletions

View File

@ -32,12 +32,19 @@ healthreport_depends = \
providers.jsm \
$(NULL)
ifneq (,$(findstring a,$(GRE_MILESTONE)))
extra_pp_flags := -DPRERELEASE_BUILD
endif
MAIN_JS_MODULE := HealthReport.jsm
MAIN_JS_MODULE_PATH = $(FINAL_TARGET)/modules
MAIN_JS_MODULE_FLAGS := $(extra_pp_flags)
PP_TARGETS += MAIN_JS_MODULE
MODULES := $(modules)
MODULES_PATH = $(FINAL_TARGET)/modules/services/healthreport
MODULES_FLAGS := $(extra_pp_flags)
PP_TARGETS += MODULES
TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))

View File

@ -1068,6 +1068,16 @@ HealthReporter.prototype = Object.freeze({
request.onSubmissionSuccess(now);
#ifdef PRERELEASE_BUILD
// Intended to be temporary until we a) assess the impact b) bug 846133
// deploys more robust storage for state.
try {
Services.prefs.savePrefFile(null);
} catch (ex) {
this._log.warn("Error forcing prefs save: " + CommonUtils.exceptionStr(ex));
}
#endif
return promise;
},