WeakPtrFactory should populate m_ref lazily.
[WebKit-https.git] / Source / WebCore / css / FontFace.h
index b0f0920..2f4c889 100644 (file)
@@ -85,7 +85,7 @@ public:
 
     void fontStateChanged(CSSFontFace&, CSSFontFace::Status oldState, CSSFontFace::Status newState) final;
 
-    WeakPtr<FontFace> createWeakPtr() const;
+    WeakPtr<FontFace> createWeakPtr();
 
     void ref() final { RefCounted::ref(); }
     void deref() final { RefCounted::deref(); }
@@ -94,7 +94,8 @@ private:
     explicit FontFace(CSSFontSelector&);
     explicit FontFace(CSSFontFace&);
 
-    RefPtr<FontFace> loadedPromiseResolve();
+    // Callback for LoadedPromise.
+    FontFace& loadedPromiseResolve();
 
     WeakPtrFactory<FontFace> m_weakPtrFactory;
     Ref<CSSFontFace> m_backing;