Closed Bug 1714395 Opened 3 years ago Closed 3 years ago

Identify browser toolbox via descriptor or toolbox instead of top level target

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox91 fixed)

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Today, we query TargetFront.isParentProcess in a few places:
https://searchfox.org/mozilla-central/search?q=.isParentProcess&path=devtools%2F&case=true&regexp=false

Theoriticaly, this is not ideal, in most case we use this attribute to know if we are in the browser toolbox. Ideally, we would query that from the DescriptorFront, which never changes. Or from the Toolbox, which knows if this is the BrowserToolbox.

I saw a couple of tests failing on such code. Because target was null.
It probably hide some other issue (code fired before targetCommand.startListening resolves, or code fired after destruction?), but at least we will no longer see this exception!

That, instead of using the current top level target, which may change, be null, ...

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/77ccabef4181
[devtools] Use descriptor front or toolbox to know if we are in a BrowserToolbox r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Regressions: 1737865
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: