[Pkg-mozext-commits] [tabmixplus] 03/10: Our session manager causing SessionStore to send 'SSWindowStateReady' event after each restored tab, regressed after Bug 1067648 - Introduce restoreTab() and use it from restoreTabs()

David Prévot taffit at moszumanska.debian.org
Tue Dec 29 19:03:19 UTC 2015


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

taffit pushed a commit to tag 0.4.2.1pre.151226a1
in repository tabmixplus.

commit 856b328dfdda77ebfca10f68a02ef631db167f97
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sat Dec 26 14:32:18 2015 +0200

    Our session manager causing SessionStore to send 'SSWindowStateReady' event after each restored tab, regressed after Bug 1067648 - Introduce restoreTab() and use it from restoreTabs()
---
 chrome/content/minit/tabView.js   |  8 ++++++--
 chrome/content/session/session.js | 16 +++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/chrome/content/minit/tabView.js b/chrome/content/minit/tabView.js
index ea29892..bf9011d 100644
--- a/chrome/content/minit/tabView.js
+++ b/chrome/content/minit/tabView.js
@@ -191,8 +191,8 @@
 
   // aWindow: rdfNodeWindow to read from
   TabmixSessionManager._setWindowStateBusy = function SM__setWindowStateBusy(aWindow) {
+    TabmixSvc.SessionStore._setWindowStateBusy(window);
     TMP_SessionStore.initService();
-    this._sendWindowStateEvent("Busy");
     this._getSessionTabviewData(aWindow);
 
     // save group count before we start the restore
@@ -201,7 +201,11 @@
     this._updateUIpageBounds = false;
   };
 
-  TabmixSessionManager._aftertWindowStateReady = function(aOverwriteTabs, showNotification) {
+  TabmixSessionManager._setWindowStateReady = function(aOverwriteTabs, showNotification) {
+    if (Tabmix.isVersion(350)) {
+      TabmixSvc.SessionStore._setWindowStateReady(window);
+    }
+
     if (!aOverwriteTabs)
       this._groupItems = this._tabviewData["tabview-group"];
 
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index b290f7d..c72e7ec 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -3375,10 +3375,9 @@ var TabmixSessionManager = { // jshint ignore:line
                                          "restoreHistoryPrecursor";
     TabmixSvc.SessionStore[fnName](window, tabs, tabsData, 0);
 
-    // SessionStore.restoreTabs send SSWindowStateReady
     // show notification and clean up our data
     var showNotification = caller != "firstwindowopen" || this.prefBranch.getIntPref("onStart") == 1;
-    this._aftertWindowStateReady(overwrite, showNotification);
+    this._setWindowStateReady(overwrite, showNotification);
 
     // when resuming at startup: add additionally requested pages to the end
     if (caller == "firstwindowopen" && loadOnStartup.length) {
@@ -3807,17 +3806,16 @@ var TabmixSessionManager = { // jshint ignore:line
     return (this.tabViewInstalled = TMP_TabView.installed);
   },
 
-  _sendWindowStateEvent: function SM__sendWindowStateEvent(aType) {
-    let event = document.createEvent("Events");
-    event.initEvent("SSWindowState" + aType, true, false);
-    window.dispatchEvent(event);
+  _setWindowStateBusy: function() {
+    TabmixSvc.SessionStore._setWindowStateBusy(window);
   },
 
-  _setWindowStateBusy: function() {
-    this._sendWindowStateEvent("Busy");
+  _setWindowStateReady: function() {
+    if (Tabmix.isVersion(350)) {
+      TabmixSvc.SessionStore._setWindowStateReady(window);
+    }
   },
 
-  _aftertWindowStateReady: function() { },
   _saveTabviewData: function() { },
   _setTabviewTab: function() { },
   _tabviewData: {},

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