mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Bug 1392970 - Part 1: Make CustomElementDefinition ref-counted and put it in CustomElementData.
Tag UXP Issue #1344
This commit is contained in:
parent
b0285ef3f7
commit
7ce1742985
7 changed files with 141 additions and 50 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue