From f07f8aecb8a03d33d0b90d685d85960a29543c75 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 17 Apr 2020 05:05:28 -0400 Subject: Bug 1352389 -Don't push extra script blocker on stack when setting attributes Tag #1375 --- dom/svg/nsSVGElement.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dom/svg') diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index 9099caaaa..df646fe7d 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -18,6 +18,7 @@ #include "nsIDOMMutationEvent.h" #include "nsSVGPathGeometryElement.h" #include "mozilla/InternalMutationEvent.h" +#include "mozAutoDocUpdate.h" #include "nsError.h" #include "nsIPresShell.h" #include "nsGkAtoms.h" @@ -1509,9 +1510,13 @@ nsSVGElement::DidChangeValue(nsIAtom* aName, uint8_t modType = HasAttr(kNameSpaceID_None, aName) ? static_cast(nsIDOMMutationEvent::MODIFICATION) : static_cast(nsIDOMMutationEvent::ADDITION); + + nsIDocument* document = GetComposedDoc(); + mozAutoDocUpdate updateBatch(document, UPDATE_CONTENT_MODEL, + kNotifyDocumentObservers); SetAttrAndNotify(kNameSpaceID_None, aName, nullptr, aEmptyOrOldValue, aNewValue, modType, hasListeners, kNotifyDocumentObservers, - kCallAfterSetAttr); + kCallAfterSetAttr, document, updateBatch); } void -- cgit v1.2.3