Closed Bug 1646143 Opened 5 years ago Closed 5 years ago

Make resource watchers be class and instantiate them from the target actor

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-m2-reserve)

Attachments

(1 file)

In the first iteration I introduced only one resource watcher (bug 1620243).
During the introduction of the second resource watcher (bug 1644185), it became obvious that some code was copy paster between each watcher.
Before introducing all of them, it would be better to address that.

Each watcher module is currently composed of two methods: watch and unwatch.
Both receiving a target actor reference. Then, each watcher module instantiate a listener specific to each target actor and save a reference in a weak map.
All of that could be factorized into the BrowsingContextTargetActor. It would actually align quite well with the existing _watchedResources Set.

Status: NEW → ASSIGNED
Blocks: 1646677
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e72a29a02eb Use instantiable classes for resource watchers. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: