[Pkg-mozext-commits] [tabmixplus] 91/147: Use Promise.catch

David Prévot taffit at moszumanska.debian.org
Sat Aug 5 15:27:40 UTC 2017


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit b53ebdef82b2b61b9d3eb4657ad4cb6bf1ed871a
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Jan 9 15:50:37 2017 +0200

    Use Promise.catch
---
 chrome/content/preferences/preferences.js | 4 ++--
 chrome/content/session/session.js         | 2 +-
 chrome/content/session/sessionStore.js    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index 606808f..f5bea6f 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -427,7 +427,7 @@ function exportData() {
       patterns.unshift("tabmixplus");
       OS.File.writeAtomic(file.path, patterns.join(""), {encoding: "utf-8", tmpPath: file.path + ".tmp"});
     }
-  }).then(null, Tabmix.reportError);
+  }).catch(Tabmix.reportError);
 }
 
 function importData() {
@@ -439,7 +439,7 @@ function importData() {
       input = decoder.decode(input);
       loadData(input.replace(/\r\n/g, "\n").split("\n"));
     }
-  }).then(null, Tabmix.reportError);
+  }).catch(Tabmix.reportError);
 }
 
 /**
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index 9f491f1..ad164a0 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -296,7 +296,7 @@ TabmixSessionManager = {
       .then(() => TMP_TabView.init())
       .then(initializeSM)
       .then(() => Tabmix.sessionInitialized())
-      .then(null, Tabmix.reportError);
+      .catch(Tabmix.reportError);
   },
 
   _init: function SM__init() {
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index 55dfd68..b8735a1 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -224,7 +224,7 @@ var TMP_SessionStore = {
         // when TMP session manager is enabled ss.doRestore is true only after restart
         ss.onceInitialized.then(() => {
           Tabmix.isWindowAfterSessionRestore = ss.doRestore();
-        }).then(null, Tabmix.reportError);
+        }).catch(Tabmix.reportError);
         // until sessionstartup initialized just return the pref value,
         // we only use isWindowAfterSessionRestore when our Session Manager enable
         return Services.prefs.getBoolPref("browser.sessionstore.resume_session_once");

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