[Pkg-mozext-commits] [tabmixplus] 18/30: Remove the use of evalInSandbox to convert old style preference
David Prévot
taffit at moszumanska.debian.org
Sun Jun 14 22:15:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 11004de8bef0e5626cf827c086521b151ada7ff6
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Jun 7 15:17:50 2015 +0300
Remove the use of evalInSandbox to convert old style preference
---
modules/DynamicRules.jsm | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/modules/DynamicRules.jsm b/modules/DynamicRules.jsm
index 40f536b..a999243 100644
--- a/modules/DynamicRules.jsm
+++ b/modules/DynamicRules.jsm
@@ -290,18 +290,10 @@ this.DynamicRules = {
}
catch (ex) {
TabmixSvc.console.log(ex);
- try {
- // convert old format to JSON string
- // we do it only one time when user update Tabmix from old version
- currentPrefValues = Components.utils.evalInSandbox("({" + prefString + "})",
- new Components.utils.Sandbox("about:blank"));
- Prefs.setCharPref(ruleName, TabmixSvc.JSON.stringify(currentPrefValues));
- } catch (er) {
- TabmixSvc.console.log('Error in preference "' + ruleName + '", value was reset to default');
- Prefs.clearUserPref(ruleName);
- // set prev value to default so we can continue with this function
- currentPrefValues = defaultPrefValues;
- }
+ TabmixSvc.console.log('Error in preference "' + ruleName + '", value was reset to default');
+ Prefs.clearUserPref(ruleName);
+ // set prev value to default so we can continue with this function
+ currentPrefValues = defaultPrefValues;
}
// make sure we have all the item
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list