Closed
Bug 1710647
Opened 3 years ago
Closed 3 years ago
resourceCommand is setting listeners on targetFront that it never removes
Categories
(DevTools :: Framework, defect)
DevTools
Framework
Tracking
(Fission Milestone:M7a, firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
we set listeners on targetFront in onTargetAvailable
(devtools/shared/commands/resource/resource-command.js#324,346-357 ) , but those are never removed.
So if a consumer does:
resourceCommand.watchResources(...)
resourceCommand.unwatchResources(...)
resourceCommand.watchResources(...)
after the second call, we'll have 2 event listeners set for the same targetFront, which could lead to duplicate resources.
Assignee | ||
Comment 1•3 years ago
|
||
Event listeners were set on target available, but they were never removed, which
could cause issue if a consumer was watching/unwatching for resources multiple
times.
A test (that was failing without this patch), is added to ensure we don't regress this.
Note that the test is still incorrect and will be properly fixed in Bug 1710674.
Updated•3 years ago
|
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Assignee | ||
Updated•3 years ago
|
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Updated•3 years ago
|
Fission Milestone: --- → M7a
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df407e796c90 [devtools] Remove targetFront event listeners in resourceCommand#_unwatchAllTargets. r=ochameau,bomsy.
Comment 3•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox90:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•