From ba8fb9dc587b982643d2e1503a4373b4380d64d7 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 4 Jan 2020 10:08:13 -0500 Subject: 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(+) (limited to 'dom/base/DocGroup.cpp') diff --git a/dom/base/DocGroup.cpp b/dom/base/DocGroup.cpp index 226879985..30c058f0c 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); } -- cgit v1.2.3