Closed Bug 1697452 Opened 4 years ago Closed 4 years ago

Don't access local tab from the toolbox target in RDM definition

Categories

(DevTools :: Framework, task)

task

Tracking

(Fission Milestone:M7, firefox88 fixed)

RESOLVED FIXED
88 Branch
Fission Milestone M7
Tracking Status
firefox88 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(1 file)

In the RDM button definition, we're accessing localTab through the toolbox target (devtools/client/definitions.js#528,533,536).
This is dangerous as when navigating the target can end up being destroyed, and the target getter for descriptorFront will throw (See devtools/client/fronts/targets/target-mixin.js#99-102)

We should directly access the localTab through the toolbox descriptorFront

Accessing toolbox.target.localTab would throw if the target was already destroyed,
which can happen if the access was happening while we where doing a target switch.

We can fix that by retrieving the localTab through the toolbox descriptorFront
instead, which will always be "alive" as long as the tab exists.

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/810d674932e6 [devtools] Access local tab from the toolbox descriptorFront instead of its target in RDM definition. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Fission Milestone: --- → M7
Whiteboard: dt-fission-m3-mvp
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: