mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Bug 1377993 - Make node slots less memory hungry in common cases.
Tag UXP Issue #1344
This commit is contained in:
parent
7f03d02552
commit
dd7fa403a8
9 changed files with 203 additions and 178 deletions
|
|
@ -301,9 +301,12 @@ nsNodeUtils::LastRelease(nsINode* aNode)
|
|||
Element* elem = aNode->AsElement();
|
||||
FragmentOrElement::nsDOMSlots* domSlots =
|
||||
static_cast<FragmentOrElement::nsDOMSlots*>(slots);
|
||||
for (auto iter = domSlots->mRegisteredIntersectionObservers.Iter(); !iter.Done(); iter.Next()) {
|
||||
DOMIntersectionObserver* observer = iter.Key();
|
||||
observer->UnlinkTarget(*elem);
|
||||
if (domSlots->mExtendedSlots) {
|
||||
for (auto iter = domSlots->mExtendedSlots->mRegisteredIntersectionObservers.Iter();
|
||||
!iter.Done(); iter.Next()) {
|
||||
DOMIntersectionObserver* observer = iter.Key();
|
||||
observer->UnlinkTarget(*elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue