mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
![Nika Layzell](/assets/img/avatar_default.png)
Previously, the DocGroup type was not cycle-collected, as it needed to have references from other threads for Quantum DOM. Nowadays the only off-main-thread use of DocGroup is for dispatching runnables to the main thread which should be tracked using a performance counter for about:performance. This means we can remove the DocGroup references from these dispatching callsites, only storing the Performance Counter we're interested in, and simplify make DocGroup be cycle-collected itself. This fixes a leak caused by adding the WindowGlobalChild getter to WindowContext, by allowing cycles between the document and its BrowsingContext to be broken by the cycle-collector. Differential Revision: https://phabricator.services.mozilla.com/D108865