Closed Bug 1728071 Opened 3 years ago Closed 3 years ago

Cached DOCUMENT_EVENT's will-navigate leaks the previous target

Categories

(DevTools :: Framework, defect)

defect

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-perf-stability-triage)

Attachments

(1 file)

We do record DOCUMENT_EVENT's will-navigate resource in the cache over here:
https://searchfox.org/mozilla-central/rev/5a362eb7d054740dc9d7c82c79a2efbc5f3e4776/devtools/shared/commands/resource/resource-command.js#591-611

But this one resource won't be cleaned on target-destroyed because that's related to the top target:
https://searchfox.org/mozilla-central/rev/5a362eb7d054740dc9d7c82c79a2efbc5f3e4776/devtools/shared/commands/resource/resource-command.js#529-537

And because onWillNavigate, which will clear top target resources:
https://searchfox.org/mozilla-central/rev/5a362eb7d054740dc9d7c82c79a2efbc5f3e4776/devtools/shared/commands/resource/resource-command.js#832-837
is called before adding will-navigate in _cache (see first link).

Attachment #9238462 - Attachment description: Bug 1728071 - [devtools] Avoid leaking the previous target via DOCUMENT_EVENT's will-navigate → Bug 1728071 - [devtools] Avoid leaking the previous target via DOCUMENT_EVENT's will-navigate.
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/17b5151f7ae3 [devtools] Avoid leaking the previous target via DOCUMENT_EVENT's will-navigate. r=nchevobbe
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: