Skip to content

Commit

Permalink
Override SessionStoreInternal's method instead of proxy's one
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jul 5, 2016
1 parent d7caa5a commit 3796026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/utils.js
Expand Up @@ -800,9 +800,9 @@ prefs.addPrefListener(TreeStyleTabUtils);
});
}

let { SessionStore } = Cu.import('resource:///modules/sessionstore/SessionStore.jsm', {});
SessionStore.__treestyletab__duplicateTab = SessionStore.duplicateTab;
SessionStore.duplicateTab = function(aWindow, aTab, aDelta = 0) {
let { SessionStoreInternal } = Cu.import('resource:///modules/sessionstore/SessionStore.jsm', {});
SessionStoreInternal.__treestyletab__duplicateTab = SessionStoreInternal.duplicateTab;
SessionStoreInternal.duplicateTab = function(aWindow, aTab, aDelta = 0) {
aWindow.gBrowser.treeStyleTab.onBeforeTabDuplicate(aWindow, aTab, aDelta);
return this.__treestyletab__duplicateTab.call(this, aWindow, aTab, aDelta);
};
Expand Down

0 comments on commit 3796026

Please sign in to comment.