Bug 1445392: Make HTMLSlotElement slot change event stuff not linear. r=smaug

Also fix refcount churn in nsDOMMutationObserver and such.

MozReview-Commit-ID: GwEB0LZY7Ss
This commit is contained in:
Emilio Cobos Álvarez
2018-05-07 19:09:19 +02:00
parent ada4e3cf62
commit f48fa2314c
5 changed files with 47 additions and 35 deletions

View File

@@ -34,9 +34,7 @@ HTMLSlotElement::HTMLSlotElement(already_AddRefed<mozilla::dom::NodeInfo>& aNode
{
}
HTMLSlotElement::~HTMLSlotElement()
{
}
HTMLSlotElement::~HTMLSlotElement() = default;
NS_IMPL_ADDREF_INHERITED(HTMLSlotElement, nsGenericHTMLElement)
NS_IMPL_RELEASE_INHERITED(HTMLSlotElement, nsGenericHTMLElement)
@@ -216,14 +214,19 @@ HTMLSlotElement::ClearAssignedNodes()
}
void
HTMLSlotElement::EnqueueSlotChangeEvent() const
HTMLSlotElement::EnqueueSlotChangeEvent()
{
if (mInSignalSlotList) {
return;
}
DocGroup* docGroup = OwnerDoc()->GetDocGroup();
if (!docGroup) {
return;
}
docGroup->SignalSlotChange(this);
mInSignalSlotList = true;
docGroup->SignalSlotChange(*this);
}
void