Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8

This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

Differential Revision: https://phabricator.services.mozilla.com/D63962
This commit is contained in:
Kris Maglione
2020-02-25 19:44:39 +00:00
parent 55f1dbfe90
commit 232ff37e9f
63 changed files with 111 additions and 55 deletions

View File

@@ -524,9 +524,10 @@ void nsDocShell::DestroyChildren() {
nsDocLoader::DestroyChildren();
}
NS_IMPL_CYCLE_COLLECTION_INHERITED(nsDocShell, nsDocLoader, mScriptGlobal,
mInitialClientSource, mSessionHistory,
mBrowsingContext, mChromeEventHandler)
NS_IMPL_CYCLE_COLLECTION_WEAK_PTR_INHERITED(nsDocShell, nsDocLoader,
mScriptGlobal, mInitialClientSource,
mSessionHistory, mBrowsingContext,
mChromeEventHandler)
NS_IMPL_ADDREF_INHERITED(nsDocShell, nsDocLoader)
NS_IMPL_RELEASE_INHERITED(nsDocShell, nsDocLoader)