[Pkg-mozext-commits] [tabmixplus] 10/32: Make sure that extensions.tabmix.version value is a string

David Prévot taffit at moszumanska.debian.org
Sun Feb 7 19:23:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 4f1b914b09ae941013296b17e2279a9f3e85e5f7
Author: onemen <tabmix.onemen at gmail.com>
Date:   Wed Dec 30 18:00:11 2015 +0200

    Make sure that extensions.tabmix.version value is a string
---
 chrome/content/tab/tab.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 0a45748..eab3f17 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -2536,7 +2536,7 @@ var gTMPprefObserver = {
     Services.prefs.clearUserPref("browser.sessionstore.enabled");
 
     let getVersion = function _getVersion(currentVersion, shouldAutoUpdate) {
-      let oldVersion = Tabmix.prefs.prefHasUserValue("version") ? Tabmix.prefs.getCharPref("version") : "";
+      let oldVersion = TabmixSvc.prefs.get("extensions.tabmix.version", "");
 
       let vCompare = (a, b) => Services.vc.compare(a, b) <= 0;
       if (oldVersion) {
@@ -2556,6 +2556,8 @@ var gTMPprefObserver = {
 
       let showNewVersionTab;
       if (currentVersion != oldVersion) {
+        // reset current preference in case it is not a string
+        Tabmix.prefs.clearUserPref("version");
         Tabmix.prefs.setCharPref("version", currentVersion);
         Services.prefs.savePrefFile(null);
         // show the new version page for all official versions and for development

-- 
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