[Font Loading] Crash when a single load request causes multiple fonts to fail loading
[WebKit-https.git] / Source / WebCore / css / FontFaceSet.h
index 871f3bce3bed9e9919b8d25777a6e985752e6bd0..870d1335ebd2cb57bce9b43aecc8b1379b0a6bd3 100644 (file)
@@ -101,6 +101,7 @@ private:
     public:
         Vector<RefPtr<FontFace>> faces;
         Promise promise;
+        bool hasReachedTerminalState { false };
     };
 
     FontFaceSet(Document&, const Vector<RefPtr<FontFace>>&);
@@ -109,19 +110,19 @@ private:
     void fulfillPromise();
 
     // CSSFontFaceSetClient
-    virtual void startedLoading() override;
-    virtual void completedLoading() override;
-    virtual void faceFinished(CSSFontFace&, CSSFontFace::Status) override;
+    void startedLoading() override;
+    void completedLoading() override;
+    void faceFinished(CSSFontFace&, CSSFontFace::Status) override;
 
     // ActiveDOMObject
-    virtual const char* activeDOMObjectName() const override { return "FontFaceSet"; }
-    virtual bool canSuspendForDocumentSuspension() const override;
+    const char* activeDOMObjectName() const override { return "FontFaceSet"; }
+    bool canSuspendForDocumentSuspension() const override;
 
     // EventTarget
-    virtual EventTargetInterface eventTargetInterface() const override { return FontFaceSetEventTargetInterfaceType; }
-    virtual ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }
-    virtual void refEventTarget() override { ref(); }
-    virtual void derefEventTarget() override { deref(); }
+    EventTargetInterface eventTargetInterface() const override { return FontFaceSetEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }
+    void refEventTarget() override { ref(); }
+    void derefEventTarget() override { deref(); }
 
     Ref<CSSFontFaceSet> m_backing;
     HashMap<RefPtr<CSSFontFace>, Vector<Ref<PendingPromise>>> m_pendingPromises;