Loading dom/base/CustomElementRegistry.cpp +0 −58 Original line number Diff line number Diff line Loading @@ -42,13 +42,6 @@ public: aCb.NoteNativeChild(mDefinition, NS_CYCLE_COLLECTION_PARTICIPANT(CustomElementDefinition)); } size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override { // We don't really own mDefinition. return aMallocSizeOf(this); } private: virtual void Invoke(Element* aElement, ErrorResult& aRv) override { Loading @@ -74,15 +67,6 @@ class CustomElementCallbackReaction final : public CustomElementReaction mCustomElementCallback->Traverse(aCb); } size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override { size_t n = aMallocSizeOf(this); n += mCustomElementCallback->SizeOfIncludingThis(aMallocSizeOf); return n; } private: virtual void Invoke(Element* aElement, ErrorResult& aRv) override { Loading @@ -95,16 +79,6 @@ class CustomElementCallbackReaction final : public CustomElementReaction //----------------------------------------------------- // CustomElementCallback size_t LifecycleCallbackArgs::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = name.SizeOfExcludingThisIfUnshared(aMallocSizeOf); n += oldValue.SizeOfExcludingThisIfUnshared(aMallocSizeOf); n += newValue.SizeOfExcludingThisIfUnshared(aMallocSizeOf); n += namespaceURI.SizeOfExcludingThisIfUnshared(aMallocSizeOf); return n; } void CustomElementCallback::Call() { Loading Loading @@ -139,24 +113,6 @@ CustomElementCallback::Traverse(nsCycleCollectionTraversalCallback& aCb) const aCb.NoteXPCOMChild(mCallback); } size_t CustomElementCallback::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = aMallocSizeOf(this); // We don't uniquely own mThisObject. // We own mCallback but it doesn't have any special memory reporting we can do // for it other than report its own size. n += aMallocSizeOf(mCallback); n += mArgs.SizeOfExcludingThis(aMallocSizeOf); // mAdoptedCallbackArgs doesn't really uniquely own its members. return n; } CustomElementCallback::CustomElementCallback(Element* aThisObject, nsIDocument::ElementCallbackType aCallbackType, mozilla::dom::CallbackFunction* aCallback) Loading Loading @@ -258,20 +214,6 @@ CustomElementData::Unlink() mCustomElementDefinition = nullptr; } size_t CustomElementData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = aMallocSizeOf(this); n += mReactionQueue.ShallowSizeOfExcludingThis(aMallocSizeOf); for (auto& reaction : mReactionQueue) { n += reaction->SizeOfIncludingThis(aMallocSizeOf); } return n; } //----------------------------------------------------- // CustomElementRegistry Loading dom/base/CustomElementRegistry.h +0 −5 Original line number Diff line number Diff line Loading @@ -41,8 +41,6 @@ struct LifecycleCallbackArgs nsString oldValue; nsString newValue; nsString namespaceURI; size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const; }; struct LifecycleAdoptedCallbackArgs Loading @@ -58,7 +56,6 @@ public: nsIDocument::ElementCallbackType aCallbackType, CallbackFunction* aCallback); void Traverse(nsCycleCollectionTraversalCallback& aCb) const; size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const; void Call(); void SetArgs(LifecycleCallbackArgs& aArgs) { Loading Loading @@ -133,7 +130,6 @@ struct CustomElementData void Traverse(nsCycleCollectionTraversalCallback& aCb) const; void Unlink(); size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const; nsAtom* GetIs(Element* aElement) { Loading Loading @@ -212,7 +208,6 @@ public: virtual ~CustomElementReaction() = default; virtual void Invoke(Element* aElement, ErrorResult& aRv) = 0; virtual void Traverse(nsCycleCollectionTraversalCallback& aCb) const = 0; virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const = 0; bool IsUpgradeReaction() { Loading dom/base/FragmentOrElement.cpp +1 −59 Original line number Diff line number Diff line Loading @@ -674,14 +674,6 @@ nsIContent::nsExtendedContentSlots::nsExtendedContentSlots() nsIContent::nsExtendedContentSlots::~nsExtendedContentSlots() = default; size_t nsIContent::nsExtendedContentSlots::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const { // For now, nothing to measure here. We don't actually own any of our // members. return 0; } FragmentOrElement::nsDOMSlots::nsDOMSlots() : nsIContent::nsContentSlots(), mDataset(nullptr) Loading Loading @@ -733,15 +725,8 @@ size_t FragmentOrElement::nsDOMSlots::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = aMallocSizeOf(this); nsExtendedContentSlots* extendedSlots = GetExtendedContentSlots(); if (OwnsExtendedSlots()) { MOZ_ASSERT(extendedSlots); n += aMallocSizeOf(extendedSlots); } if (extendedSlots) { n += extendedSlots->SizeOfExcludingThis(aMallocSizeOf); n += aMallocSizeOf(GetExtendedContentSlots()); } if (mAttributeMap) { Loading Loading @@ -815,49 +800,6 @@ FragmentOrElement::nsExtendedDOMSlots::TraverseExtendedSlots(nsCycleCollectionTr } } size_t FragmentOrElement::nsExtendedDOMSlots::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = nsIContent::nsExtendedContentSlots::SizeOfExcludingThis(aMallocSizeOf); // We own mSMILOverrideStyle but there seems to be no memory reporting on CSS // declarations? At least report the memory the declaration takes up // directly. if (mSMILOverrideStyle) { n += aMallocSizeOf(mSMILOverrideStyle); } // We don't really own mSMILOverrideStyleDeclaration. mSMILOverrideStyle owns // it. // We don't seem to have memory reporting for nsXULControllers. At least // report the memory it's using directly. if (mControllers) { n += aMallocSizeOf(mControllers); } // We don't seem to have memory reporting for nsLabelsNodeList. At least // report the memory it's using directly. if (mLabelsList) { n += aMallocSizeOf(mLabelsList); } // mShadowRoot should be handled during normal DOM tree memory reporting, just // like kids, siblings, etc. // We don't seem to have memory reporting for nsXBLBinding. At least // report the memory it's using directly. if (mXBLBinding) { n += aMallocSizeOf(mXBLBinding); } if (mCustomElementData) { n += mCustomElementData->SizeOfIncludingThis(aMallocSizeOf); } return n; } FragmentOrElement::FragmentOrElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo) : nsIContent(aNodeInfo) { Loading dom/base/FragmentOrElement.h +0 −2 Original line number Diff line number Diff line Loading @@ -174,8 +174,6 @@ public: void TraverseExtendedSlots(nsCycleCollectionTraversalCallback&) final; void UnlinkExtendedSlots() final; size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const final; /** * SMIL Overridde style rules (for SMIL animation of CSS properties) * @see Element::GetSMILOverrideStyle Loading dom/base/nsIContent.h +0 −2 Original line number Diff line number Diff line Loading @@ -797,8 +797,6 @@ protected: virtual void TraverseExtendedSlots(nsCycleCollectionTraversalCallback&); virtual void UnlinkExtendedSlots(); virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; /** * The nearest enclosing content node with a binding that created us. * TODO(emilio): This should be an Element*. Loading Loading
dom/base/CustomElementRegistry.cpp +0 −58 Original line number Diff line number Diff line Loading @@ -42,13 +42,6 @@ public: aCb.NoteNativeChild(mDefinition, NS_CYCLE_COLLECTION_PARTICIPANT(CustomElementDefinition)); } size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override { // We don't really own mDefinition. return aMallocSizeOf(this); } private: virtual void Invoke(Element* aElement, ErrorResult& aRv) override { Loading @@ -74,15 +67,6 @@ class CustomElementCallbackReaction final : public CustomElementReaction mCustomElementCallback->Traverse(aCb); } size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override { size_t n = aMallocSizeOf(this); n += mCustomElementCallback->SizeOfIncludingThis(aMallocSizeOf); return n; } private: virtual void Invoke(Element* aElement, ErrorResult& aRv) override { Loading @@ -95,16 +79,6 @@ class CustomElementCallbackReaction final : public CustomElementReaction //----------------------------------------------------- // CustomElementCallback size_t LifecycleCallbackArgs::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = name.SizeOfExcludingThisIfUnshared(aMallocSizeOf); n += oldValue.SizeOfExcludingThisIfUnshared(aMallocSizeOf); n += newValue.SizeOfExcludingThisIfUnshared(aMallocSizeOf); n += namespaceURI.SizeOfExcludingThisIfUnshared(aMallocSizeOf); return n; } void CustomElementCallback::Call() { Loading Loading @@ -139,24 +113,6 @@ CustomElementCallback::Traverse(nsCycleCollectionTraversalCallback& aCb) const aCb.NoteXPCOMChild(mCallback); } size_t CustomElementCallback::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = aMallocSizeOf(this); // We don't uniquely own mThisObject. // We own mCallback but it doesn't have any special memory reporting we can do // for it other than report its own size. n += aMallocSizeOf(mCallback); n += mArgs.SizeOfExcludingThis(aMallocSizeOf); // mAdoptedCallbackArgs doesn't really uniquely own its members. return n; } CustomElementCallback::CustomElementCallback(Element* aThisObject, nsIDocument::ElementCallbackType aCallbackType, mozilla::dom::CallbackFunction* aCallback) Loading Loading @@ -258,20 +214,6 @@ CustomElementData::Unlink() mCustomElementDefinition = nullptr; } size_t CustomElementData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = aMallocSizeOf(this); n += mReactionQueue.ShallowSizeOfExcludingThis(aMallocSizeOf); for (auto& reaction : mReactionQueue) { n += reaction->SizeOfIncludingThis(aMallocSizeOf); } return n; } //----------------------------------------------------- // CustomElementRegistry Loading
dom/base/CustomElementRegistry.h +0 −5 Original line number Diff line number Diff line Loading @@ -41,8 +41,6 @@ struct LifecycleCallbackArgs nsString oldValue; nsString newValue; nsString namespaceURI; size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const; }; struct LifecycleAdoptedCallbackArgs Loading @@ -58,7 +56,6 @@ public: nsIDocument::ElementCallbackType aCallbackType, CallbackFunction* aCallback); void Traverse(nsCycleCollectionTraversalCallback& aCb) const; size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const; void Call(); void SetArgs(LifecycleCallbackArgs& aArgs) { Loading Loading @@ -133,7 +130,6 @@ struct CustomElementData void Traverse(nsCycleCollectionTraversalCallback& aCb) const; void Unlink(); size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const; nsAtom* GetIs(Element* aElement) { Loading Loading @@ -212,7 +208,6 @@ public: virtual ~CustomElementReaction() = default; virtual void Invoke(Element* aElement, ErrorResult& aRv) = 0; virtual void Traverse(nsCycleCollectionTraversalCallback& aCb) const = 0; virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const = 0; bool IsUpgradeReaction() { Loading
dom/base/FragmentOrElement.cpp +1 −59 Original line number Diff line number Diff line Loading @@ -674,14 +674,6 @@ nsIContent::nsExtendedContentSlots::nsExtendedContentSlots() nsIContent::nsExtendedContentSlots::~nsExtendedContentSlots() = default; size_t nsIContent::nsExtendedContentSlots::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const { // For now, nothing to measure here. We don't actually own any of our // members. return 0; } FragmentOrElement::nsDOMSlots::nsDOMSlots() : nsIContent::nsContentSlots(), mDataset(nullptr) Loading Loading @@ -733,15 +725,8 @@ size_t FragmentOrElement::nsDOMSlots::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = aMallocSizeOf(this); nsExtendedContentSlots* extendedSlots = GetExtendedContentSlots(); if (OwnsExtendedSlots()) { MOZ_ASSERT(extendedSlots); n += aMallocSizeOf(extendedSlots); } if (extendedSlots) { n += extendedSlots->SizeOfExcludingThis(aMallocSizeOf); n += aMallocSizeOf(GetExtendedContentSlots()); } if (mAttributeMap) { Loading Loading @@ -815,49 +800,6 @@ FragmentOrElement::nsExtendedDOMSlots::TraverseExtendedSlots(nsCycleCollectionTr } } size_t FragmentOrElement::nsExtendedDOMSlots::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const { size_t n = nsIContent::nsExtendedContentSlots::SizeOfExcludingThis(aMallocSizeOf); // We own mSMILOverrideStyle but there seems to be no memory reporting on CSS // declarations? At least report the memory the declaration takes up // directly. if (mSMILOverrideStyle) { n += aMallocSizeOf(mSMILOverrideStyle); } // We don't really own mSMILOverrideStyleDeclaration. mSMILOverrideStyle owns // it. // We don't seem to have memory reporting for nsXULControllers. At least // report the memory it's using directly. if (mControllers) { n += aMallocSizeOf(mControllers); } // We don't seem to have memory reporting for nsLabelsNodeList. At least // report the memory it's using directly. if (mLabelsList) { n += aMallocSizeOf(mLabelsList); } // mShadowRoot should be handled during normal DOM tree memory reporting, just // like kids, siblings, etc. // We don't seem to have memory reporting for nsXBLBinding. At least // report the memory it's using directly. if (mXBLBinding) { n += aMallocSizeOf(mXBLBinding); } if (mCustomElementData) { n += mCustomElementData->SizeOfIncludingThis(aMallocSizeOf); } return n; } FragmentOrElement::FragmentOrElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo) : nsIContent(aNodeInfo) { Loading
dom/base/FragmentOrElement.h +0 −2 Original line number Diff line number Diff line Loading @@ -174,8 +174,6 @@ public: void TraverseExtendedSlots(nsCycleCollectionTraversalCallback&) final; void UnlinkExtendedSlots() final; size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const final; /** * SMIL Overridde style rules (for SMIL animation of CSS properties) * @see Element::GetSMILOverrideStyle Loading
dom/base/nsIContent.h +0 −2 Original line number Diff line number Diff line Loading @@ -797,8 +797,6 @@ protected: virtual void TraverseExtendedSlots(nsCycleCollectionTraversalCallback&); virtual void UnlinkExtendedSlots(); virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; /** * The nearest enclosing content node with a binding that created us. * TODO(emilio): This should be an Element*. Loading