WeakPtrFactory should populate m_ref lazily.
[WebKit-https.git] / Source / WebCore / svg / SVGPathElement.h
index 3f47105..4824782 100644 (file)
@@ -97,7 +97,7 @@ public:
 
     bool isAnimValObserved() const { return m_isAnimValObserved; }
 
-    WeakPtr<SVGPathElement> createWeakPtr() const { return m_weakPtrFactory.createWeakPtr(); }
+    WeakPtr<SVGPathElement> createWeakPtr() const { return m_weakPtrFactory.createWeakPtr(*const_cast<SVGPathElement*>(this)); }
 
     void animatedPropertyWillBeDeleted();