Bug 1638219 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Looking at the stacktrace and doing some preliminary investigation, both issues are very similar. It would make sense to have a single bug and to try to address them at the same time.

Our TargetList reacts to various events to retrieve new targets. Retrieving workers and service workers is highly async for now, and the client can be destroyed after we received the event but while we still need to call some APIs to retrieve the targets.

In some methods we acknowledge this, eg https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/devtools/shared/resources/legacy-target-watchers/legacy-serviceworkers-watcher.js#112-123 . We could use similar patterns in the methods showing up in the stack traces in order to fix this class of intermittents. Note that we have a [safeAsyncMethod helper](https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/devtools/shared/async-utils.js#54) that could be useful here.
> Should we modify the summary of this failure to mention both, or make a separate bug?

Looking at the stacktrace and doing some preliminary investigation, both issues are very similar. It would make sense to have a single bug and to try to address them at the same time.

Some additional info about the intermittent: our TargetList reacts to various events to retrieve new targets. Retrieving workers and service workers is highly async for now, and the client can be destroyed after we received the event but while we still need to call some APIs to retrieve the targets. In some methods we acknowledge this, eg https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/devtools/shared/resources/legacy-target-watchers/legacy-serviceworkers-watcher.js#112-123 . We could use similar patterns in the methods showing up in the stack traces in order to fix this class of intermittents. Note that we have a [safeAsyncMethod helper](https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/devtools/shared/async-utils.js#54) that could be useful here.

Back to Bug 1638219 Comment 13