Open Bug 1566851 Opened 1 year ago Updated 2 months ago

Convert `target.threadFront` to `target.getFront("thread")`

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Fission Milestone:M6)

Fission Milestone M6

People

(Reporter: ochameau, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-reserve)

ThreadFront and WebConsoleFront are the only two one left having a special codepath in TargetMixin.
These two are special as there is synchronous attributes on the target object, activeConsole and threadFront, in order to get a reference to them.
Their instantiation is also special as you have to call target.attachConsole as well as target.attachThread in order to create these attributes.
There is some discrepancies between these two and all the other one which are created on-demand on the first call to target.getFront:

In any case, we should distinguish the two following operation:

  • retrieving the front: target.getFront("xxx")
  • "attaching it": console.startListeners([]) and thread.attach(options)

A first iteration would be to do this split and use target.getFront everywhere.
Then, we could possibly iterate in order to cleanup the various way we are "attaching" these actors.

Why is this important to switch to getFront?

  • enable target.onFront to work with these two fronts. Fission is going to force us to support more than one front instance. In a near future, we are going to replace a few calls to getFront into calls to onFront. This step will be easier if we are already using getFront.
  • having a unified codebase. There is no reason but historical ones to have specifics around these two fronts.
Blocks: dbg-fission
Priority: P3 → P2
Whiteboard: dt-fission
Blocks: dbg-protocol-js
No longer blocks: dbg-fission
Priority: P2 → P3
Whiteboard: dt-fission → dt-fission-reserve

A quick update about this bug. Comment 0 is still relevant but let's go through the still existing usages of target.threadFront and target.attachThread.

Tracking Fission DevTools bugs for Fission Nightly (M6)

Fission Milestone: --- → M6
You need to log in before you can comment on or make changes to this bug.