[Pkg-mozext-commits] [tabmixplus] 04/20: GetGlobalForObject not working to get global SessionStore in Firefox 57

David Prévot taffit at moszumanska.debian.org
Thu Nov 16 18:58:53 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 5423773316c3f83bf34c7cb90974b0f1528bcbcd
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Sep 18 11:20:01 2017 -0700

    GetGlobalForObject not working to get global SessionStore in Firefox 57
---
 modules/TabmixSvc.jsm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/modules/TabmixSvc.jsm b/modules/TabmixSvc.jsm
index 87d8a5f..2bcb8ec 100644
--- a/modules/TabmixSvc.jsm
+++ b/modules/TabmixSvc.jsm
@@ -360,14 +360,16 @@ XPCOMUtils.defineLazyModuleGetter(TabmixSvc, "FileUtils",
 XPCOMUtils.defineLazyModuleGetter(TabmixSvc, "console",
   "resource://tabmixplus/log.jsm");
 
-XPCOMUtils.defineLazyGetter(TabmixSvc, "ss", () => {
-  let tmp = {};
-  Cu.import("resource:///modules/sessionstore/SessionStore.jsm", tmp);
-  return tmp.SessionStore;
+XPCOMUtils.defineLazyGetter(TabmixSvc, "SessionStoreGlobal", () => {
+  const sessionStoreModule = Cu.import("resource:///modules/sessionstore/SessionStore.jsm", {});
+  if (isVersion(570)) {
+    return sessionStoreModule;
+  }
+  return Cu.getGlobalForObject(sessionStoreModule);
 });
 
-XPCOMUtils.defineLazyGetter(TabmixSvc, "SessionStoreGlobal", function() {
-  return Cu.getGlobalForObject(this.ss);
+XPCOMUtils.defineLazyGetter(TabmixSvc, "ss", function() {
+  return this.SessionStoreGlobal.SessionStore;
 });
 
 XPCOMUtils.defineLazyGetter(TabmixSvc, "SessionStore", function() {

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