Closed Bug 1625909 Opened 6 months ago Closed 3 months ago

Use the ResourceWatcher API to fetch Network Event

Categories

(DevTools :: Netmonitor, enhancement, P1)

enhancement

Tracking

(Fission Milestone:M6c, firefox80 fixed)

RESOLVED FIXED
Firefox 80
Fission Milestone M6c
Tracking Status
firefox80 --- fixed

People

(Reporter: ochameau, Assigned: bomsy)

References

(Blocks 7 open bugs)

Details

(Whiteboard: dt-fission-m2-mvp)

Attachments

(1 file)

Bug 1576624 introduced the ResourceWatcher API, accessible via toolbox.resourceWatcher. This API will help listen to data that is being created early, when the document just started loading.

We should migrate the whole DevTools codebase to this API for any data that:

  • DevTools frontend listen to, or care about,
    and,
  • may be created or be notified early, when the document just starts being loaded.
    This data will typically be: console messages, errors, warnings, sources, Root element NodeFront, storage values, network events, stylesheets, ...

We are typically not going to use this API for:

  • data being fetched on-demand, from user's input. For ex: webconsole evaluation input, or, DOM element expands from the Markup view.
  • events which we only want to record when the user cares about them. For ex: animation events.

For some more high level context, please have a look at Migration to Fission-compatible APIs, which describes all Fission-related refactorings.

The typical task for this bug will be about migrating code that:

  • start listening and register a RDP event listener,
  • retrieve already existings data,
    from panel's codebase, to the ResourceWatcher module, in the LegacyListener object.
    And then, the panel should use the ResourceWatcher instead.

Bug 1620234 is a good example of such migration, applied to Console Messages.
Bug 1623699 is also useful example as it demonstrates how to write tests for such migration.

This bug is about focusing on only one usecase in the netmonitor and console: the Network Events.
This bug may be split in multiple sub tasks as network events are:

  • used by both console and netmonitor
  • is slightly more complex than any other resource as there is two RDP events networkEvent and networkEventUpdate
    It isn't clear how the existing ResourceWatcher API will comply to existing netmonitor expectations... We might tweak the ResourceWatcher to help the migration.

Network Events are currently being listened via WebConsoleFront.startListeners(["NetworkActivity"]), from here:

Depends on: 1576624
No longer depends on: 1620234

Tracking Fission DevTools bugs for Fission Nightly (M6) milestone

Fission Milestone: --- → M6
Blocks: 1626645
Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
Priority: P2 → P1

This is a WIP patch, needs to be rebased over D69329 when it is done.

Attachment #9141668 - Attachment description: Bug 1625909 - Use the ResourceWatcher API to fetch Network Event r=ochameau,honza → Bug 1625909 - Use the ResourceWatcher API to fetch Network Events r=ochameau,honza
No longer blocks: 1633748
Depends on: 1637641

Tracking dt-fission-m2-mvp bugs for Fission Nightly milestone (M6c)

Fission Milestone: M6 → M6c
Blocks: 1644191
Blocks: 1650747
Blocks: 1650743
Blocks: 1651028
Blocks: 1651030
Duplicate of this bug: 1637587
Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e95324121fde
Use the ResourceWatcher API to fetch Network Events r=ochameau,Honza,nchevobbe
Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e8dc91ec04f9
Use the ResourceWatcher API to fetch Network Events r=ochameau,Honza,nchevobbe
Flags: needinfo?(hmanilla)
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 80
Blocks: 1654740
Regressions: 1656388
Regressions: 1661186
You need to log in before you can comment on or make changes to this bug.