Bug 1499661 - use 'this' instead of 'gBrowser' in moveTabsToStart and moveTabsToEnd, r=dao
authorVineeth Karra <vineethchinmay12345@gmail.com>
Mon, 22 Oct 2018 15:56:01 +0000
changeset 490887 02067918a4d85206c71f73fd9fe0a0ebfd8e1d60
parent 490886 f8615bd92bc605151a21266c148a9254e666d40d
child 490888 bb60a56fe1d0ba49772a9629cde805ef833e6440
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersdao
bugs1499661
milestone65.0a1
Bug 1499661 - use 'this' instead of 'gBrowser' in moveTabsToStart and moveTabsToEnd, r=dao Differential Revision: https://phabricator.services.mozilla.com/D9374
browser/base/content/tabbrowser.js
--- 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);
       }
     }
   },