mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Bug 1410790 - Add more assertion in CustomElementData::SetCustomElementDefinition and GetCustomElementDefinition;
This is a follow-up patch for bug 1392970. Since we only set CustomElementDefinition on a custom element which is custom, we could add more assertion to ensure that. Tag UXP Issue #1344
This commit is contained in:
parent
afc180e2f1
commit
76b1eaa538
3 changed files with 52 additions and 31 deletions
|
|
@ -583,19 +583,7 @@ FragmentOrElement::nsDOMSlots::Traverse(nsCycleCollectionTraversalCallback &cb)
|
|||
cb.NoteXPCOMChild(mExtendedSlots->mXBLInsertionParent.get());
|
||||
|
||||
if (mExtendedSlots->mCustomElementData) {
|
||||
for (uint32_t i = 0;
|
||||
i < mExtendedSlots->mCustomElementData->mReactionQueue.Length(); i++) {
|
||||
if (mExtendedSlots->mCustomElementData->mReactionQueue[i]) {
|
||||
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));
|
||||
}
|
||||
mExtendedSlots->mCustomElementData->Traverse(cb);
|
||||
}
|
||||
|
||||
for (auto iter = mExtendedSlots->mRegisteredIntersectionObservers.Iter();
|
||||
|
|
@ -633,9 +621,7 @@ FragmentOrElement::nsDOMSlots::Unlink()
|
|||
MOZ_ASSERT(!(mExtendedSlots->mXBLBinding));
|
||||
mExtendedSlots->mXBLInsertionParent = nullptr;
|
||||
if (mExtendedSlots->mCustomElementData) {
|
||||
if (mExtendedSlots->mCustomElementData->mCustomElementDefinition) {
|
||||
mExtendedSlots->mCustomElementData->mCustomElementDefinition = nullptr;
|
||||
}
|
||||
mExtendedSlots->mCustomElementData->Unlink();
|
||||
mExtendedSlots->mCustomElementData = nullptr;
|
||||
}
|
||||
mExtendedSlots->mRegisteredIntersectionObservers.Clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue