SourceMapURLService only relies on will-navigate to clear its internal state
Categories
(DevTools :: Framework, task, P3)
Tracking
(Fission Milestone:M7a, firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: jdescottes, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The SourceMapURLService is only relying on the will-navigate event to clear its internal state, and it only does so for the first target of the toolbox.
This most likely means that the SourceMapURLService is not working correctly in target switching scenarios. For instance:
- enable fission
- navigate to mozilla.org
- open devtools on the inspector (ensures starting the sourcemap service)
- navigate to google.com
- navigate to youtube.com
- navigate to various domains...
ER: The internal maps should be cleared.
AR: _urlToIDMap
grows indefinitely. Note that this is keyed by URL so you need to visit new domains to make it grow a lot.
Also, regardless of target-switching, _mapsById
is never-ever cleared. This might explain why enabling sourcemaps leaks a lot of memory.
The logic is also really odd. When the target navigates, the SourceMapURLService will stop watching for SOURCE resources. It probably relies on the UI making another call to one of its APIs?
We should add a test for this and fix the source map service in target switching scenarios.
Reporter | ||
Comment 1•4 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #0)
Also, regardless of target-switching,
_mapsById
is never-ever cleared. This might explain why enabling sourcemaps leaks a lot of memory.
The map easily grows to have thousands of items after just opening the MBT on a regular profile with a dozen of tabs.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
bugherder |
Description
•