summaryrefslogtreecommitdiffstats
path: root/dom/base/Element.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-04 19:48:30 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:18 -0500
commitcc533eaee5b800a534b93484598779debcdf5591 (patch)
treef4613faeda690275556065ad825c1c249e155afe /dom/base/Element.cpp
parent59c26110c1124844b5c6820573a8cb4807f1151a (diff)
downloadUXP-cc533eaee5b800a534b93484598779debcdf5591.tar
UXP-cc533eaee5b800a534b93484598779debcdf5591.tar.gz
UXP-cc533eaee5b800a534b93484598779debcdf5591.tar.lz
UXP-cc533eaee5b800a534b93484598779debcdf5591.tar.xz
UXP-cc533eaee5b800a534b93484598779debcdf5591.zip
Bug 1377993 - Make node slots less memory hungry in common cases.
Tag UXP Issue #1344
Diffstat (limited to 'dom/base/Element.cpp')
-rw-r--r--dom/base/Element.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
index 7d926f6bb..81cc41210 100644
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1595,7 +1595,7 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
#endif
{
if (aBindingParent) {
- nsDOMSlots *slots = DOMSlots();
+ nsExtendedDOMSlots* slots = ExtendedDOMSlots();
slots->mBindingParent = aBindingParent; // Weak, so no addref happens.
}
@@ -1618,7 +1618,7 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
}
ShadowRoot* parentContainingShadow = aParent->GetContainingShadow();
if (parentContainingShadow) {
- DOMSlots()->mContainingShadow = parentContainingShadow;
+ ExtendedDOMSlots()->mContainingShadow = parentContainingShadow;
}
}
@@ -2007,7 +2007,7 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
}
#endif
- nsDOMSlots* slots = GetExistingDOMSlots();
+ nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
if (slots) {
if (clearBindingParent) {
slots->mBindingParent = nullptr;
@@ -2055,7 +2055,7 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
nsICSSDeclaration*
Element::GetSMILOverrideStyle()
{
- Element::nsDOMSlots *slots = DOMSlots();
+ Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots();
if (!slots->mSMILOverrideStyle) {
slots->mSMILOverrideStyle = new nsDOMCSSAttributeDeclaration(this, true);
@@ -2067,7 +2067,7 @@ Element::GetSMILOverrideStyle()
DeclarationBlock*
Element::GetSMILOverrideStyleDeclaration()
{
- Element::nsDOMSlots *slots = GetExistingDOMSlots();
+ Element::nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
return slots ? slots->mSMILOverrideStyleDeclaration.get() : nullptr;
}
@@ -2075,7 +2075,7 @@ nsresult
Element::SetSMILOverrideStyleDeclaration(DeclarationBlock* aDeclaration,
bool aNotify)
{
- Element::nsDOMSlots *slots = DOMSlots();
+ Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots();
slots->mSMILOverrideStyleDeclaration = aDeclaration;
@@ -3988,7 +3988,7 @@ Element::ClearDataset()
nsDataHashtable<nsRefPtrHashKey<DOMIntersectionObserver>, int32_t>*
Element::RegisteredIntersectionObservers()
{
- nsDOMSlots* slots = DOMSlots();
+ nsExtendedDOMSlots* slots = ExtendedDOMSlots();
return &slots->mRegisteredIntersectionObservers;
}
@@ -4041,7 +4041,7 @@ Element::UpdateIntersectionObservation(DOMIntersectionObserver* aObserver, int32
void
Element::SetCustomElementData(CustomElementData* aData)
{
- nsDOMSlots *slots = DOMSlots();
+ nsExtendedDOMSlots *slots = ExtendedDOMSlots();
MOZ_ASSERT(!slots->mCustomElementData, "Custom element data may not be changed once set.");
slots->mCustomElementData = aData;
}