summaryrefslogtreecommitdiff
path: root/dom/base/DocGroup.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-04 10:08:13 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:12 -0500
commitba8fb9dc587b982643d2e1503a4373b4380d64d7 (patch)
tree039634ce14c5c60b4da18c448bfdbdee3e56633a /dom/base/DocGroup.cpp
parent16cd53bd8d53441cd0829298ddf43b15ba5fa3a8 (diff)
downloaduxp-ba8fb9dc587b982643d2e1503a4373b4380d64d7.tar.gz
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
Diffstat (limited to 'dom/base/DocGroup.cpp')
-rw-r--r--dom/base/DocGroup.cpp3
1 files changed, 3 insertions, 0 deletions
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);
}