Closed
Bug 596833
Opened 14 years ago
Closed 14 years ago
Refinement for bug 595943: No need to iterate over all tabs, just the ones at the beginning
Categories
(Firefox Graveyard :: Panorama, defect, P4)
Firefox Graveyard
Panorama
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 5
People
(Reporter: iangilman, Assigned: raymondlee)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
>+++ b/browser/base/content/tabview/ui.js
...
>+ // Don't return to TabView if there are any app tabs
>+ for (let a = 0; a < gBrowser.tabs.length; a++) {
>+ let theTab = gBrowser.tabs[a];
>+ if (theTab.pinned && gBrowser._removingTabs.indexOf(theTab) == -1)
>+ return;
>+ }
I don't think you need to iterate over the whole list of tabs... AFAIK AppTabs
are always at the beginning, so you could break early.
for (let a = 0; a < gBrowser.tabs.length; a++) {
let theTab = gBrowser.tabs[a];
if (!theTab.pinned)
break;
if (gBrowser._removingTabs.indexOf(theTab) == -1)
return;
}
Updated•14 years ago
|
Priority: -- → P4
Updated•14 years ago
|
Target Milestone: --- → Future
Updated•14 years ago
|
Summary: refinement for bug 595943 → Refinement for bug 595943: No need to iterate over all tabs, just the ones at the beginning
Reporter | ||
Updated•14 years ago
|
Assignee: nobody → ian
Reporter | ||
Comment 1•14 years ago
|
||
Not a big deal, but might as well take care of it. Raymond, would you mind taking this on as well?
Assignee | ||
Comment 2•14 years ago
|
||
Sent it to try and waiting for the results.
http://tbpl.mozilla.org/?tree=MozillaTry&rev=146cac2a9075
Attachment #523957 -
Flags: feedback?(tim.taubert)
Assignee | ||
Updated•14 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•14 years ago
|
||
Passed Try!
Comment 4•14 years ago
|
||
Comment on attachment 523957 [details] [diff] [review]
v1
I personally don't really like the break and return statements combined - it's pretty hard to read (and get what it's doing).
I'd prefer the following:
>-for (let a = 0; a < gBrowser.tabs.length; a++) {
>+for (let a = 0; a < gBrowser._numPinnedTabs; a++) {
Would you concur with that solution? We could also ask Ian to throw in his two cents :)
Assignee | ||
Comment 5•14 years ago
|
||
Taking tim's suggestion.
Attachment #523957 -
Attachment is obsolete: true
Attachment #524338 -
Flags: feedback?(tim.taubert)
Attachment #523957 -
Flags: feedback?(tim.taubert)
Updated•14 years ago
|
Attachment #524338 -
Flags: feedback?(tim.taubert) → feedback+
Assignee | ||
Updated•14 years ago
|
Attachment #524338 -
Flags: review?(ian)
Reporter | ||
Comment 6•14 years ago
|
||
Comment on attachment 524338 [details] [diff] [review]
v2
Looks great! Thank you.
Attachment #524338 -
Flags: review?(ian) → review+
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #524338 -
Attachment is obsolete: true
Assignee | ||
Comment 8•14 years ago
|
||
(In reply to comment #7)
> Created attachment 524576 [details] [diff] [review]
> Patch for checkin
Passed Try!
http://tbpl.mozilla.org/?tree=MozillaTry&rev=56785418a284
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Updated•14 years ago
|
Attachment #524576 -
Attachment is patch: true
Attachment #524576 -
Attachment mime type: application/octet-stream → text/plain
Comment 9•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox4.2
Updated•14 years ago
|
Target Milestone: Firefox5 → Firefox 5
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•