[Pkg-mozext-commits] [tabmixplus] 30/51: Wrong null check in changeset 0230ba00d9b5, Hinting chrome/content/* folders
David Prévot
taffit at moszumanska.debian.org
Mon Feb 2 18:36:51 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 086723a485a2265cb286fa0fa223e9b29245bb16
Author: onemen <tabmix.onemen at gmail.com>
Date: Tue Jan 6 20:17:34 2015 +0200
Wrong null check in changeset 0230ba00d9b5, Hinting chrome/content/* folders
---
chrome/content/click/click.js | 2 +-
chrome/content/links/userInterface.js | 3 ++-
chrome/content/minit/tablib.js | 4 ++--
chrome/content/tab/tab.js | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/chrome/content/click/click.js b/chrome/content/click/click.js
index ef9989e..a8ab6c5 100644
--- a/chrome/content/click/click.js
+++ b/chrome/content/click/click.js
@@ -269,7 +269,7 @@ var TabmixTabClickOptions = {
}
break;
case 30: // enable/disable AutoReload
- if (aTab.autoReloadEnabled === null)
+ if (aTab.autoReloadEnabled === undefined)
Tabmix.autoReload.initTab(aTab);
Tabmix.autoReload.toggle(aTab);
break;
diff --git a/chrome/content/links/userInterface.js b/chrome/content/links/userInterface.js
index cbf7f55..288583b 100644
--- a/chrome/content/links/userInterface.js
+++ b/chrome/content/links/userInterface.js
@@ -52,7 +52,8 @@ Tabmix.openURL = function TMP_openURL(aURL, event) {
linkTarget = 1;
}
- if (aURL === null) aURL = "about:blank";
+ if (!aURL)
+ aURL = "about:blank";
// check for an existing window and focus it; it's not application modal
var browserWindow = this.getTopWin();
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 67c5593..7d36930 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -1555,11 +1555,11 @@ var tablib = {
Tabmix.setNewFunction(gBrowser, "warnAboutClosingTabs", warnAboutClosingTabs);
gBrowser.TMP_selectNewForegroundTab = function (aTab, aLoadInBackground, aUrl, addOwner) {
- var bgLoad = (aLoadInBackground !== null) ? aLoadInBackground :
+ var bgLoad = typeof aLoadInBackground == "boolean" ? aLoadInBackground :
Services.prefs.getBoolPref("browser.tabs.loadInBackground");
if (!bgLoad) {
// set new tab owner
- addOwner = addOwner !== null ? addOwner : true;
+ addOwner = typeof addOwner == "boolean" ? addOwner : true;
if (addOwner)
aTab.owner = this.selectedTab;
this.selectedTab = aTab;
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index d2cc60c..fee419a 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -2300,7 +2300,7 @@ var gTMPprefObserver = {
let str = Cc["@mozilla.org/supports-string;1"].createInstance(nsISupportsString);
str.data = Services.prefs.getComplexValue(oldPref, nsISupportsString).data;
// only updtae new preference value if the old control preference is New Tab Page
- let control = controlPref === null || Tabmix.prefs.prefHasUserValue(controlPref) &&
+ let control = controlPref === undefined || Tabmix.prefs.prefHasUserValue(controlPref) &&
Tabmix.prefs.getIntPref(controlPref) == 4;
if (str.data !== "" && control)
Services.prefs.setComplexValue(newPref, nsISupportsString, str);
--
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