[Pkg-mozext-commits] [tabmixplus] 33/47: Calling sessionstartup.doRestore before it finished to read sessionstore.js throw an error
David Prévot
taffit at moszumanska.debian.org
Fri Sep 26 20:57:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository tabmixplus.
commit 87f06b9d099cba6d91ea8eaa7104640e1236ce72
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Sep 21 22:21:48 2014 +0300
Calling sessionstartup.doRestore before it finished to read sessionstore.js throw an error
---
chrome/content/session/sessionStore.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index 1d29bd6..9f09a70 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -240,12 +240,20 @@ var TMP_SessionStore = {
Tabmix.isWindowAfterSessionRestore = afterSessionRestore;
else {
// calling doRestore before sessionstartup finished to read
- // sessionstroe.js file force syncRead
+ // sessionstroe.js file throw error since Firefox 28, and force
+ // syncRead in Firefox 25-27
XPCOMUtils.defineLazyGetter(Tabmix, "isWindowAfterSessionRestore", function() {
let ss = Cc["@mozilla.org/browser/sessionstartup;1"].
getService(Ci.nsISessionStartup);
// when TMP session manager is enabled ss.doRestore is true only after restart
- return ss.doRestore();
+ if (!Tabmix.isVersion(250))
+ return ss.doRestore();
+ ss.onceInitialized.then(function() {
+ Tabmix.isWindowAfterSessionRestore = ss.doRestore();
+ }).then(null, Cu.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