Bug 1499661 - use 'this' instead of 'gBrowser' in moveTabsToStart and moveTabsToEnd, r=dao
☠☠ backed out by e7d0ae555a8d ☠ ☠
authorVineeth Karra <vineethchinmay12345@gmail.com>
Mon, 22 Oct 2018 13:08:27 +0000
changeset 490677 e9ce17673999128f9d5874ce6240b14fd63ffcc6
parent 490676 6d7c64b773c99ea4fd06d1a1ddd63606c0219865
child 490678 e4d47f8261f74e4d19262ac68a79d76ddbd3d8f7
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersdao
bugs1499661
milestone64.0a1
Bug 1499661 - use 'this' instead of 'gBrowser' in moveTabsToStart and moveTabsToEnd, r=dao Differential Revision: https://phabricator.services.mozilla.com/D9374
PHABTEST
browser/base/content/tabbrowser.js
new file mode 100644
--- /dev/null
+++ b/PHABTEST
@@ -0,0 +1,1 @@
+change
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -2575,30 +2575,30 @@ window._gBrowser = {
       this._notifyPinnedStatus(t);
     }
 
     return t;
   },
 
   moveTabsToStart(contextTab) {
     let tabs = contextTab.multiselected ?
-      gBrowser.selectedTabs :
+      this.selectedTabs :
       [contextTab];
     // Walk the array in reverse order so the tabs are kept in order.
     for (let i = tabs.length - 1; i >= 0; i--) {
       let tab = tabs[i];
       if (tab._tPos > 0) {
         this.moveTabTo(tab, 0);
       }
     }
   },
 
   moveTabsToEnd(contextTab) {
     let tabs = contextTab.multiselected ?
-      gBrowser.selectedTabs :
+      this.selectedTabs :
       [contextTab];
     for (let tab of tabs) {
       if (tab._tPos < this.tabs.length - 1) {
         this.moveTabTo(tab, this.tabs.length - 1);
       }
     }
   },