Title: [221835] trunk/Source/WebCore
Revision
221835
Author
[email protected]
Date
2017-09-10 11:55:24 -0700 (Sun, 10 Sep 2017)

Log Message

Fix double resolve assertion in FontFaceSet seen while running tests
https://bugs.webkit.org/show_bug.cgi?id=176525

Reviewed by Brent Fulgham.

* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::FontFaceSet): Only resolve the promise if the CSSFontFaceSet
is already loaded. Otherwise, we will resolve it later when it calls completedLoading.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (221834 => 221835)


--- trunk/Source/WebCore/ChangeLog	2017-09-10 16:36:52 UTC (rev 221834)
+++ trunk/Source/WebCore/ChangeLog	2017-09-10 18:55:24 UTC (rev 221835)
@@ -1,3 +1,14 @@
+2017-09-07  Darin Adler  <[email protected]>
+
+        Fix double resolve assertion in FontFaceSet seen while running tests
+        https://bugs.webkit.org/show_bug.cgi?id=176525
+
+        Reviewed by Brent Fulgham.
+
+        * css/FontFaceSet.cpp:
+        (WebCore::FontFaceSet::FontFaceSet): Only resolve the promise if the CSSFontFaceSet
+        is already loaded. Otherwise, we will resolve it later when it calls completedLoading.
+
 2017-09-08  Dean Jackson  <[email protected]>
 
         gl.detachShader breaks shader program

Modified: trunk/Source/WebCore/css/FontFaceSet.cpp (221834 => 221835)


--- trunk/Source/WebCore/css/FontFaceSet.cpp	2017-09-10 16:36:52 UTC (rev 221834)
+++ trunk/Source/WebCore/css/FontFaceSet.cpp	2017-09-10 18:55:24 UTC (rev 221835)
@@ -63,8 +63,9 @@
     , m_backing(backing)
     , m_readyPromise(*this, &FontFaceSet::readyPromiseResolve)
 {
-    m_readyPromise.resolve(*this);
     m_backing->addClient(*this);
+    if (m_backing->status() == CSSFontFaceSet::Status::Loaded)
+        m_readyPromise.resolve(*this);
 }
 
 FontFaceSet::~FontFaceSet()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to