diff --git a/layout/svg/SVGObserverUtils.cpp b/layout/svg/SVGObserverUtils.cpp index d9e37b710049..1e2a06d8435f 100644 --- a/layout/svg/SVGObserverUtils.cpp +++ b/layout/svg/SVGObserverUtils.cpp @@ -539,7 +539,9 @@ class BackgroundClipRenderingObserver : public SVGRenderingObserver { NS_DECL_ISUPPORTS private: - virtual ~BackgroundClipRenderingObserver() { StopObserving(); } + // We do not call StopObserving() since the observing and observed element + // are the same element (and because we could crash - see bug 1556441). + virtual ~BackgroundClipRenderingObserver() = default; Element* GetReferencedElementWithoutObserving() final { return mFrame->GetContent()->AsElement();