Open Bug 1566851 Opened 5 years ago Updated 2 years ago

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

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Fission Milestone:Future)

Fission Milestone Future

People

(Reporter: ochameau, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-future)

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

dt-fission-reserve bugs do not need to block Fission Nightly (M6).

Fission Milestone: M6 → ---

Tracking dt-fission-reserve bugs for Fission MVP until we know whether they really need to block Fission or not.

Fission Milestone: --- → MVP

Moving old "dt-fission-reserve" bugs to "dt-fission-future" because they don't block Fission MVP.

Fission Milestone: MVP → Future
Whiteboard: dt-fission-reserve → dt-fission-future
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.