Closed Bug 1483935 Opened Last year Closed Last year

Tab count on "warn on close multiple tabs" when quitting the browser is wrong

Categories

(Firefox :: Tabbed Browser, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- verified

People

(Reporter: clement.lefevre, Assigned: Gijs)

References

Details

(Keywords: nightly-community, regression, Whiteboard: [mozfr-community])

Attachments

(1 file)

When quitting the browser, for now some times in nightly we have a "warn on closing multiple tabs" that show a tab count.

However, that tab count is completely wrong:! it only counts the number of tabs in the window currently in foreground and ignore all the other ones.

This count should consider the numbner of tabs in every windows.
Component: General → Tabbed Browser
Blocks: 1438499
Keywords: regression
Priority: -- → P2
See Also: → 550559
This worked when bug 1438499 landed; it regressed in bug 1475427 which changed warnAboutClosingTabs. The fix is trivial, we just need to remove the `null` parameter from the nsBrowserGlue.js callsite. I'll do up a patch on Monday if nobody beats me to it.
Blocks: 1475427
Flags: needinfo?(gijskruitbosch+bugs)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(gijskruitbosch+bugs)
Bug 1438499 added an optional parameter to warnAboutClosingTabs.
In bug 1475427, the arguments to warnAboutClosingTabs changed, and instead
of passing a closing tab reference as the second argument, we now need to
pass the number of tabs as the first argument. The patch in that bug
updated the callsite in nsBrowserGlue.js to add the new argument, but
didn't remove the `null` argument that we were passing for the 'extra' tab.

Additionally, the change in bug 1475427 bails early from
warnAboutClosingTabs if the number of tabs passed is less than 2. That tab
count, too, needs to take into account multiple windows and not just the
last window iterated over.

This patch fixes both of these issues.
Comment on attachment 9002539 [details]
Bug 1483935 - correctly check all windows for tabs when quitting, r?mconley

Mike Conley (:mconley) (:⚙️) has approved the revision.
Attachment #9002539 - Flags: review+
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/00e27ad3f9ff
correctly check all windows for tabs when quitting, r=mconley
https://hg.mozilla.org/mozilla-central/rev/00e27ad3f9ff
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Flags: qe-verify+
Verified that this issue is no longer reproducible using Firefox 63.0b8 (BuildId:20180920135444) on Windows 10 64bit, macOS 10.13.6 and Ubuntu 16.04 64bit.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Depends on: 1502179
You need to log in before you can comment on or make changes to this bug.