Closed Bug 1586251 Opened 2 years ago Closed 1 year ago

Ensure the Fission-ready box model highlighter uses the right window


(DevTools :: Inspector, defect, P1)



(Fission Milestone:M6)

Fission Milestone M6


(Reporter: rcaliman, Assigned: rcaliman)


(Blocks 1 open bug)


(Whiteboard: dt-fission-reserve)


(1 obsolete file)

This is a follow-up from Bug 1572651.

There are scenarios where the inferred selectedBrowser where the box model renderer will draw is not the correct one. This can happen in a few cases as explained by Julian in code review:

Case 1

If you start using devtools in a separate window, or worse, remote debugging, it's possible to make this assumption fail.

An "easy" one with DevTools docked as a separate window.
First of all, to setup devtools correctly

open devtools wherever
detach them to a separate window
select the console (or any tool except the inspector really)
close devtools


open two browser windows, window A on, window B on
open devtools on window A (it should open in a separate window, with webconsole selected)
click in window B
select inspector in devtools

-> Highlighter will be created in window B but will highlight elements from window A.

Maybe a fix will be to let the observer pass the browsingContext id to the highlighter so that it can find the right element?

Case 2

debugging a local extension via about:debugging will also confuse this. When the about:devtools-toolbox loads, the selectedBrowser will be the one for the about:devtools-toolbox tab and not the one for the addon.

Depends on: 1572651
Priority: P2 → P1

To ensure the right browser window is selected when drawing the Box Model Highlighter, the browsing context id of the inspected frame is passed from the observer (child process) to the renderer (parent process). This identifier is used to select the right parent browser window via the available BrowsingContext global API:

context = BrowsingContext.get(browsingContextID);
window = context.embedderElement.ownerGlobal;

To pass the browsing context id from the child process to the parent process, the setupInParent util method from DevbuggerServerConnection is extended to accept an optional array of arguments to pass to the invoked method on the parent. This is similar to the existing spawnActorInParentProcess() which also accepts additional arbitrary arguments.

Note: BrowsingContext.get(browsingContextID) doesn't seem to work while in the browser toolbox (inspecting the browser UI). For this scenario, a fallback to the most recently focused browser window is used.

Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:


Fission Milestone: --- → ?
Whiteboard: dt-fission → dt-fission-reserve

Tracking for enabling Fission in Nightly (M6)

Fission Milestone: ? → M6

To be addressed by patch for bug 1598307

Closed: 1 year ago
Resolution: --- → WONTFIX
Attachment #9102905 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.