Closed Bug 1822301 Opened 2 years ago Closed 2 years ago

Clear Sources content reducer on each target/thread removal

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(4 files)

Similarly to bug 1814177, sources content reducer should be clearer per target/thread removal in order to avoid sources text content when pausing during unload event.

Blocks: 1827909

In order to properly clear all reducers when thread is removed,
it is helpful to compute the list of source and source actor objects
alongside the REMOVE_THREAD action.

It is especially important for source objects which aren't bound to
any particular thread and are only cleared once all thread stopped
refering to a particular shared source url.
The list of source objects to be removed can only be computed based
on sources.js reducer data.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

This help reduce the memory footprint when a target is removed, especially in the browser toolbox.
And it will help stop clearing the whole state on navigation.

Instead of storing a subset of attributes, it would drastically simplify things
to store the source actors objects. These objects are immutable so it is safe
to store them into the reducer.
It will prevent having to do many ID to object lookup!

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/84473d29f48a [devtools] Store source actor objects in sources reducer's actors map. r=devtools-reviewers,nchevobbe https://hg.mozilla.org/integration/autoland/rev/bb6bd39b293c [devtools] Compute source and source actor objects to be removed from actions. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/7e211af17b37 [devtools] Clear sources-content reducer on each thread removal. r=devtools-reviewers,nchevobbe https://hg.mozilla.org/integration/autoland/rev/4b3a4ca27c4f [devtools] Use location's source and sourceActor from sources-content selectors. r=devtools-reviewers,nchevobbe
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: