From 932dde0dfeb1c56d159bdef16fe223442864a6e5 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 4 Jan 2020 10:08:13 -0500 Subject: [PATCH] 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 --- dom/base/DocGroup.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dom/base/DocGroup.cpp b/dom/base/DocGroup.cpp index 226879985c..30c058f0c6 100644 --- a/dom/base/DocGroup.cpp +++ b/dom/base/DocGroup.cpp @@ -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); }