[Pkg-mozext-commits] [requestpolicy] 232/280: work around Mozilla Bug 1144248 (cache flush)
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:30:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 6d1d98cff0ac23faad9784c98fa8973bde3f221a
Author: Martin Kimmerle <dev at 256k.de>
Date: Thu Mar 19 00:18:25 2015 +0100
work around Mozilla Bug 1144248 (cache flush)
---
src/bootstrap.js | 8 ++++++++
src/content/lib/environment.process.js | 5 -----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/bootstrap.js b/src/bootstrap.js
index 738ce6e..c22a6f9 100644
--- a/src/bootstrap.js
+++ b/src/bootstrap.js
@@ -62,6 +62,14 @@ function shutdown(data, reason) {
function install(data, reason) {
// note: the addon might be not activated when this function gets called
+
+ // HACK WARNING: The Addon Manager does not properly clear all addon
+ // related caches on update; in order to fully update
+ // images and locales, their caches are flushed.
+ // Note: Due to Bug 1144248 this has to be done in the
+ // `install` function.
+ Components.utils.import("resource://gre/modules/Services.jsm");
+ Services.obs.notifyObservers(null, "chrome-flush-caches", null);
}
function uninstall(data, reason) {
diff --git a/src/content/lib/environment.process.js b/src/content/lib/environment.process.js
index 4b20e97..7333366 100644
--- a/src/content/lib/environment.process.js
+++ b/src/content/lib/environment.process.js
@@ -138,11 +138,6 @@ let ProcessEnvironment = (function() {
ProcessEnvironmentBase.prototype.shutdown.apply(self, arguments);
- // HACK WARNING: The Addon Manager does not properly clear all addon
- // related caches on update; in order to fully update
- // images and locales, their caches need clearing here.
- Services.obs.notifyObservers(null, "chrome-flush-caches", null);
-
ScriptLoader.doShutdownTasks();
Cu.unload("chrome://requestpolicy/content/lib/script-loader.jsm");
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list