[Pkg-mozext-commits] [tabmixplus] 63/123: Follow up changeset 1553cb0a2702. 1. TabmixSvc.ss holds reference to SessionStore.jsm only since Firefox 25. 2. SessionStore.restoreTabs function name was SessionStore.restoreHistoryPrecursor until Firefox 27.

David Prévot taffit at moszumanska.debian.org
Wed Sep 17 21:16:27 UTC 2014


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit f0feea764d92f3ca5c9e4e0dc958a363ad1154bb
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Sep 1 21:57:26 2014 +0300

    Follow up changeset 1553cb0a2702. 1. TabmixSvc.ss holds reference to SessionStore.jsm only since Firefox 25. 2. SessionStore.restoreTabs function name was SessionStore.restoreHistoryPrecursor until Firefox 27.
---
 chrome/content/session/session.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index fb088e7..448177c 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -3159,7 +3159,14 @@ try{
       this._saveTabviewData();
 
       // call internal SessionStore functions to restore tabs
-      let global = Cu.getGlobalForObject(TabmixSvc.ss);
+      let getSSmodule = function() {
+        if (Tabmix.isVersion(250))
+          return TabmixSvc.ss;
+        let tmp = {}
+        Cu.import("resource:///modules/sessionstore/SessionStore.jsm", tmp);
+        return tmp.SessionStore;
+      }
+      let global = Cu.getGlobalForObject(getSSmodule());
       let SessionStore = global.SessionStoreInternal;
       if (overwrite) {
         for (let i = 0; i < gBrowser.tabs.length; i++) {
@@ -3168,7 +3175,9 @@ try{
             SessionStore._resetTabRestoringState(tab);
         }
       }
-      SessionStore.restoreTabs(window, tabs, tabsData, 0);
+      let fnName = Tabmix.isVersion(280) ? "restoreTabs" :
+                                           "restoreHistoryPrecursor";
+      SessionStore[fnName](window, tabs, tabsData, 0);
 
       // SessionStore.restoreTabs send SSWindowStateReady
       // show notification and clean up our data

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