Title: [278615] branches/safari-607-branch/Source/WebCore/css/FontFace.cpp
Revision
278615
Author
[email protected]
Date
2021-06-08 09:54:10 -0700 (Tue, 08 Jun 2021)

Log Message

Apply patch. rdar://problem/78789795

Modified Paths


Diff

Modified: branches/safari-607-branch/Source/WebCore/css/FontFace.cpp (278614 => 278615)


--- branches/safari-607-branch/Source/WebCore/css/FontFace.cpp	2021-06-08 16:53:06 UTC (rev 278614)
+++ branches/safari-607-branch/Source/WebCore/css/FontFace.cpp	2021-06-08 16:54:10 UTC (rev 278615)
@@ -443,7 +443,8 @@
         // gone through a load cycle, we can sometimes come back through here and try to resolve the promise again.  
         if (!m_loadedPromise.isFulfilled())
             m_loadedPromise.resolve(*this);
-        deref();
+        if (face.status() != CSSFontFace::Status::Success && face.status() != CSSFontFace::Status::Failure)
+            deref();
         return;
     case CSSFontFace::Status::Failure:
         // FIXME: This check should not be needed, but because FontFace's are sometimes adopted after they have already
@@ -450,7 +451,8 @@
         // gone through a load cycle, we can sometimes come back through here and try to resolve the promise again.  
         if (!m_loadedPromise.isFulfilled())
             m_loadedPromise.reject(Exception { NetworkError });
-        deref();
+        if (face.status() != CSSFontFace::Status::Success && face.status() != CSSFontFace::Status::Failure)
+            deref();
         return;
     case CSSFontFace::Status::Pending:
         ASSERT_NOT_REACHED();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to