Closed Bug 1698842 Opened 3 years ago Closed 3 years ago

Prevent TargetCommand from notifying about new target that are already destroyed

Categories

(DevTools :: Framework, defect)

defect

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(2 files)

When trying to run devtools/client/framework/test/browser_toolbox_backward_forward_navigation.js test with patches from bug 1631451,
the test often fails with fission enabled because various onTargetAvailable function get called with an already destroyed target front.

This happens because the target is destroyed while TargetComment await for target attach and initialize thread front.
https://searchfox.org/mozilla-central/source/devtools/shared/commands/target/target-command.js#165-181

We should check that before calling emitAsync and call all the onTargetAvailable, that the target front is still usable.

Assignee: nobody → poirot.alex

This helps browser_toolbox_backward_forward_navigation.js passing with fission enabled.

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55166c719cd2
[devtools] Avoid notifying about already destroyed targets from TargetCommand. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/0d9035ed5c50
[devtools] Avoid a few cases where targetFront is null during a client side target switching. r=nchevobbe
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b791ebfc50aa
[devtools] Avoid notifying about already destroyed targets from TargetCommand. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/cfa1cd1f0ad0
[devtools] Avoid a few cases where targetFront is null during a client side target switching. r=nchevobbe
Regressions: 1645563
Flags: needinfo?(poirot.alex)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Regressions: 1699590
Blocks: 1631451
No longer blocks: 1644397
No longer depends on: 1631451
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: