Bug 596833 - Refinement for bug 595943: No need to iterate over all tabs, just the ones at the beginning r=ian
authorRaymond Lee <raymond@raysquare.com>
Fri, 08 Apr 2011 13:19:48 +0800
changeset 67798 d90464774dfe407b5560830b58881d59ec486e72
parent 67797 4ff3dfaadd48709d3287b4a9104f3b4d9f5ccee1
child 67799 52e0b9902f48ccf739271dcf4d89f0d7a6b8b71b
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersian
bugs596833, 595943
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 596833 - Refinement for bug 595943: No need to iterate over all tabs, just the ones at the beginning r=ian
browser/base/content/tabview/ui.js
--- a/browser/base/content/tabview/ui.js
+++ b/browser/base/content/tabview/ui.js
@@ -709,19 +709,19 @@ let UI = {
         // If we're currently in the process of entering private browsing,
         // we don't want to go to the Tab View UI. 
         if (self._privateBrowsing.transitionMode)
           return; 
           
         // if not closing the last tab
         if (gBrowser.tabs.length > 1) {
           // Don't return to TabView if there are any app tabs
-          for (let a = 0; a < gBrowser.tabs.length; a++) {
+          for (let a = 0; a < gBrowser._numPinnedTabs; a++) {
             let theTab = gBrowser.tabs[a]; 
-            if (theTab.pinned && gBrowser._removingTabs.indexOf(theTab) == -1) 
+            if (gBrowser._removingTabs.indexOf(theTab) == -1) 
               return;
           }
 
           var groupItem = GroupItems.getActiveGroupItem();
 
           // 1) Only go back to the TabView tab when there you close the last
           // tab of a groupItem.
           let closingLastOfGroup = (groupItem &&