Bug 1350960 - Release CustomElementReactionsStack in TabGroup thread when DocGroup is going away.

Note: In UXP we use non-Quantum thread checking implementation here.

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-04 10:08:13 -05:00 committed by Roy Tam
commit 932dde0dfe

View file

@ -46,6 +46,9 @@ DocGroup::DocGroup(TabGroup* aTabGroup, const nsACString& aKey)
DocGroup::~DocGroup()
{
MOZ_ASSERT(mDocuments.IsEmpty());
if (!NS_IsMainThread()) {
NS_ReleaseOnMainThread(mReactionsStack.forget());
}
mTabGroup->mDocGroups.RemoveEntry(mKey);
}