[Pkg-mozext-commits] [greasemonkey] 47/62: Call Config.uninstall(), not Script.uninstall().
David Prévot
taffit at moszumanska.debian.org
Sun Sep 13 22:10:24 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit ed61cac868e490c7ec67e7faec5cb1bbd9e83b09
Author: Anthony Lieuallen <arantius at gmail.com>
Date: Fri Aug 28 17:46:22 2015 -0400
Call Config.uninstall(), not Script.uninstall().
Refs #2186
---
modules/script.js | 1 +
modules/sync.js | 7 +++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/script.js b/modules/script.js
index a9abd6b..bbb1859 100644
--- a/modules/script.js
+++ b/modules/script.js
@@ -907,6 +907,7 @@ Script.prototype.allFilesExist = function() {
return this.allFiles().every(this.fileExists);
};
+/// Don't call this! Call Config.uninstall(), which calls this.
Script.prototype.uninstall = function(forUpdate) {
if ('undefined' == typeof(forUpdate)) forUpdate = false;
diff --git a/modules/sync.js b/modules/sync.js
index ad12571..e6d5973 100644
--- a/modules/sync.js
+++ b/modules/sync.js
@@ -120,8 +120,7 @@ ScriptStore.prototype = {
}));
} else {
var script = scriptForSyncId(aRecord.cleartext.id);
- if (!script) return;
- script.uninstall();
+ if (script) GM_util.getService().config.uninstall(script);
}
},
@@ -197,7 +196,7 @@ ScriptStore.prototype = {
remove: function(aRecord) {
var script = scriptForSyncId(aRecord.cleartext.id);
- if (script) script.uninstall();
+ if (script) GM_util.getService().config.uninstall(this._script);
},
update: function(aRecord) {
@@ -207,7 +206,7 @@ ScriptStore.prototype = {
return;
}
if (!aRecord.cleartext.installed) {
- script.uninstall();
+ GM_util.getService().config.uninstall(script);
} else {
script.enabled = !!aRecord.cleartext.enabled;
script.userExcludes = aRecord.cleartext.userExcludes || [];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list