Closed Bug 1707555 Opened 4 years ago Closed 3 years ago

All thread actor options should be passed via the thread configuration actor.

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Fission Milestone:M8, firefox91 fixed)

RESOLVED FIXED
91 Branch
Fission Milestone M8
Tracking Status
firefox91 --- fixed

People

(Reporter: ochameau, Assigned: bomsy)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(1 file)

For now, only pause on exception flags are passed via the thread configuration actor.
But we would have to do the same for all thread actor options if we want to enable server side target switching by default (bug 1698891). Otherwise, these flags won't be set correctly when we instantiate the target actor very early during the page load.

It would probably be easier to first expose a thread configuration command, so that we can simplify a bit TargetMixin's attachThread method.
These options are all these ones:
https://searchfox.org/mozilla-central/source/devtools/client/shared/thread-utils.js#20-49

Depends on: 1707556

After bug 1707556 is done, we should probably have the thread configuration to mimic what is currently done in TargetMixin:
https://searchfox.org/mozilla-central/source/devtools/client/fronts/targets/target-mixin.js#514-519

      const options = await getThreadOptions();
      // If the target is destroyed or soon will be, don't go further
      if (this.isDestroyedOrBeingDestroyed()) {
        return;
      }
      const threadFront = await this.attachThread(options);

And fetch default options via getThreadOptions and pass these options to the ThreadConfigurationAtor via updateConfiguration.
And that work should probably be called from the toolbox, around these lines:
https://searchfox.org/mozilla-central/rev/9f76a47f4aa935b49754c5608a1c8e72ee358c46/devtools/client/framework/toolbox.js#792-823
Doing this before watchTargets sounds like a good option, it would allow to have the configuration set before creating the targets.

The most complex part here would probably be to handle backward compat and avoid passing options from TargetActorMixin once we pass them all via thread configuration. Note that we can probably still pass the options the two ways, but it would be nice to pass them only once for performance reasons. Once we use the thread configuration, we pass the options only once to the server and the server dispatch the options to all the contexts. We no longer need to pass the options manually to each individual thread actor from the frontend!

Fission Milestone: --- → M8
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Blocks: dbg-fission
Severity: -- → S3
Priority: -- → P3
Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6004cc4ec83 [devtools] Use thread configuration actor for all thread options r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: