Closed Bug 1493628 Opened 6 years ago Closed 6 years ago

BrowserWindowTracker assumes Browser:Init messages only ever come from foreground windows

Categories

(Firefox :: General, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

(Spotted when looking at about:blank creation stuff forced by BrowserWindowTracker getting the outerWindowID on a parent-process browser when creating a new window, which will call contentWindow.windowUtils.outerWindowID, which forces creation of the about:blank window) Browser:Init messages are sent when browser-child.js loads, for any frame. The code in BrowserWindowTracker checks that the browser is the selected browser in that window, but if so it'll unconditionally update the 'current toplevel window' outerWindowID. This is stored by netwerk/ code in a single parent process static var, so messing with it in this way seems... wrong. We should also check that the window is the toplevel window.
Priority: -- → P1
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
It seems it also makes this assumption for all the other callers that update the 'current' outerWindowID, e.g. tab selects in background windows or opening minimized windows will also throw off this code...
Blocks: 1366822
Comment on attachment 9012136 [details] Bug 1493628 - only update the 'current' outerWindowID when the browser window is the foreground window, r?dao Dão Gottwald [::dao] has approved the revision.
Attachment #9012136 - Flags: review+
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/513ebcc0f395 only update the 'current' outerWindowID when the browser window is the foreground window, r=dao
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: