Open Bug 1640886 Opened 6 months ago Updated 2 months ago

Ensure that ResourceWatcher.watch resolves only *after* all onAvailable callbacks have resolved

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(Fission Milestone:MVP)

Fission Milestone MVP

People

(Reporter: ochameau, Unassigned)

References

Details

(Whiteboard: dt-fission-m2-reserve)

Today, TargetList.watchTargets and ResourceWatcher.watch are having a different behavior regarding when these two method resolve.
For TargetList, it only resolves when all onTargetAvailable callbacks for the watched target type resolved for all the already existing targets.
In the case of ResourceWatcher, we resolve only once we retrieve all the existing resources from the server, but do not wait for any async onResourceAvailable callback.

We might want to have the same behavior, so that:

  • it would be easier in the future to merge TargetList and ResourceWatcher?
  • these two API with very similar semantic follow the same behavior. Ans so we avoid confusion,
  • we may at some point benefit from watchTarget's behavior when processing resources.
Depends on: 1637641

Tracking dt-fission-m2-reserve bugs for Fission Beta milestone (M7).

Fission Milestone: --- → M7

Bulk move of all dt-fission-m2-reserve bugs to Fission MVP milestone.

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