Override SessionStoreInternal's method instead of proxy's one

This commit is contained in:
YUKI Hiroshi 2016-07-05 14:54:18 +09:00
parent d7caa5ac59
commit 3796026995

View File

@ -800,9 +800,9 @@ prefs.addPrefListener(TreeStyleTabUtils);
}); });
} }
let { SessionStore } = Cu.import('resource:///modules/sessionstore/SessionStore.jsm', {}); let { SessionStoreInternal } = Cu.import('resource:///modules/sessionstore/SessionStore.jsm', {});
SessionStore.__treestyletab__duplicateTab = SessionStore.duplicateTab; SessionStoreInternal.__treestyletab__duplicateTab = SessionStoreInternal.duplicateTab;
SessionStore.duplicateTab = function(aWindow, aTab, aDelta = 0) { SessionStoreInternal.duplicateTab = function(aWindow, aTab, aDelta = 0) {
aWindow.gBrowser.treeStyleTab.onBeforeTabDuplicate(aWindow, aTab, aDelta); aWindow.gBrowser.treeStyleTab.onBeforeTabDuplicate(aWindow, aTab, aDelta);
return this.__treestyletab__duplicateTab.call(this, aWindow, aTab, aDelta); return this.__treestyletab__duplicateTab.call(this, aWindow, aTab, aDelta);
}; };