Closed Bug 1483935 Opened Last year Closed Last year
Tab count on "warn on close multiple tabs" when quitting the browser is wrong
46 bytes, text/x-phabricator-request
|Details | Review|
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.
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.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/00e27ad3f9ff correctly check all windows for tabs when quitting, r=mconley
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.
You need to log in before you can comment on or make changes to this bug.