Closed Bug 1625935 Opened 4 years ago Closed 4 years ago

Use the ResourceWatcher API to fetch Storage data

Categories

(DevTools :: Storage Inspector, task, P2)

task

Tracking

(Fission Milestone:M7, firefox83 fixed)

RESOLVED FIXED
83 Branch
Fission Milestone M7
Tracking Status
firefox83 --- fixed

People

(Reporter: ochameau, Assigned: ladybenko)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission-m2-mvp)

Attachments

(1 file, 4 obsolete files)

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: the storage data.

Existing storage data is being fetched via StorageFront.listStores, from here:
https://searchfox.org/mozilla-central/rev/9c6e7500c0015a2c60be7b1b888261d95095ce27/devtools/client/storage/ui.js#293
And updates are being listened from here:
https://searchfox.org/mozilla-central/rev/9c6e7500c0015a2c60be7b1b888261d95095ce27/devtools/client/storage/ui.js#290-291

We might have to tweak ResourceWatcher here in order to convey the notion of "resource has been updated" and/or "resource has been destroyed".

Blocks: 1625942

Tracking Fission DevTools bugs for Fission Nightly (M6) milestone

Fission Milestone: --- → M6
Blocks: 1626645
Assignee: nobody → dwalsh
Status: NEW → ASSIGNED

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

Fission Milestone: M6 → M6c
Blocks: 1644192
Attachment #9149898 - Attachment description: Bug 1625935 - Implement ResourceWatcher for Storage panel r=ochameau → Bug 1625935 - Implement ResourceWatcher for Storage panel r=ochameau
Attachment #9149898 - Attachment is obsolete: true
Assignee: dwalsh → balbeza
Attached file Add fission storage watchers (wip) (obsolete) —

Depends on D86050

Whiteboard: dt-fission-m2-mvp → dt-fission-m2-reserve
Depends on: 1666519
Blocks: 1666519
No longer depends on: 1666519
Blocks: 1666528
Blocks: 1666529
Blocks: 1666532
Blocks: 1666533
Blocks: 1666534

This is D86050, rebased on top of current central. I kept it a separate commit, so the new stuff can be reviewed separately in a different revision.

Depends on D91122. This adds support for receiving an array of resources in the update/available/destroy callbacks

Whiteboard: dt-fission-m2-reserve → dt-fission-m2-mvp
Attachment #9177360 - Attachment is obsolete: true
Attachment #9177355 - Attachment description: Bug 1625935 - Part 1: Implement ResourceWatcher for Storage panel r=ochameau → Bug 1625935 - [devtools] Implement ResourceWatcher with legacy listeners for Storage panel r=ochameau

Bulk move of all m2-mvp devtools bugs to Fission M7.

Fission Milestone: M6c → M7
Pushed by balbeza@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3e4fdf53c557
[devtools] Implement ResourceWatcher with legacy listeners for Storage panel r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Regressions: 1669509
Regressions: 1679725
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: