summaryrefslogtreecommitdiffstats
path: root/dom/base/FragmentOrElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/FragmentOrElement.cpp')
-rw-r--r--dom/base/FragmentOrElement.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
index e341ae315..a851190ff 100644
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -589,6 +589,13 @@ FragmentOrElement::nsDOMSlots::Traverse(nsCycleCollectionTraversalCallback &cb)
mExtendedSlots->mCustomElementData->mReactionQueue[i]->Traverse(cb);
}
}
+
+ if (mExtendedSlots->mCustomElementData->mCustomElementDefinition) {
+ NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb,
+ "mExtendedSlots->mCustomElementData->mCustomElementDefinition");
+ cb.NoteNativeChild(mExtendedSlots->mCustomElementData->mCustomElementDefinition,
+ NS_CYCLE_COLLECTION_PARTICIPANT(CustomElementDefinition));
+ }
}
for (auto iter = mExtendedSlots->mRegisteredIntersectionObservers.Iter();
@@ -625,7 +632,12 @@ FragmentOrElement::nsDOMSlots::Unlink()
mExtendedSlots->mContainingShadow = nullptr;
MOZ_ASSERT(!(mExtendedSlots->mXBLBinding));
mExtendedSlots->mXBLInsertionParent = nullptr;
- mExtendedSlots->mCustomElementData = nullptr;
+ if (mExtendedSlots->mCustomElementData) {
+ if (mExtendedSlots->mCustomElementData->mCustomElementDefinition) {
+ mExtendedSlots->mCustomElementData->mCustomElementDefinition = nullptr;
+ }
+ mExtendedSlots->mCustomElementData = nullptr;
+ }
mExtendedSlots->mRegisteredIntersectionObservers.Clear();
nsCOMPtr<nsIFrameLoader> frameLoader =
do_QueryInterface(mExtendedSlots->mFrameLoaderOrOpener);