Bug 1719178 - properly disconnect nsSHistory from the owner object, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D119114
This commit is contained in:
@@ -139,6 +139,10 @@ CanonicalBrowsingContext::~CanonicalBrowsingContext() {
|
||||
mPermanentKey.setNull();
|
||||
|
||||
mozilla::DropJSObjects(this);
|
||||
|
||||
if (mSessionHistory) {
|
||||
mSessionHistory->SetBrowsingContext(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
/* static */
|
||||
@@ -2512,7 +2516,9 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(CanonicalBrowsingContext)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(CanonicalBrowsingContext,
|
||||
BrowsingContext)
|
||||
tmp->mPermanentKey.setNull();
|
||||
|
||||
if (tmp->mSessionHistory) {
|
||||
tmp->mSessionHistory->SetBrowsingContext(nullptr);
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mSessionHistory, mContainerFeaturePolicy,
|
||||
mCurrentBrowserParent, mWebProgress,
|
||||
mSessionStoreSessionStorageUpdateTimer)
|
||||
|
||||
Reference in New Issue
Block a user