Title: [282587] branches/safari-612-branch/Source/WebCore
Revision
282587
Author
[email protected]
Date
2021-09-16 11:49:18 -0700 (Thu, 16 Sep 2021)

Log Message

Cherry-pick r282049. rdar://problem/83183765

    Remove unnecessary uses of Ref protect = m_backing from FontFaceSet
    https://bugs.webkit.org/show_bug.cgi?id=229911

    Reviewed by Anders Carlsson.

    The only callers of these are from JS. So, JS will maintain a ref to
    the FontFaceSet, and the FontFaceSet will maintain a ref to its
    CSSFontFaceSet. So it doesn't need to be protected.

    No new tests because there is no behavior change.

    * css/FontFaceSet.cpp:
    (WebCore::FontFaceSet::size):
    (WebCore::FontFaceSet::check):
    (WebCore::FontFaceSet::status const):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (282586 => 282587)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-16 18:49:15 UTC (rev 282586)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-16 18:49:18 UTC (rev 282587)
@@ -1,5 +1,46 @@
 2021-09-16  Russell Epstein  <[email protected]>
 
+        Cherry-pick r282049. rdar://problem/83183765
+
+    Remove unnecessary uses of Ref protect = m_backing from FontFaceSet
+    https://bugs.webkit.org/show_bug.cgi?id=229911
+    
+    Reviewed by Anders Carlsson.
+    
+    The only callers of these are from JS. So, JS will maintain a ref to
+    the FontFaceSet, and the FontFaceSet will maintain a ref to its
+    CSSFontFaceSet. So it doesn't need to be protected.
+    
+    No new tests because there is no behavior change.
+    
+    * css/FontFaceSet.cpp:
+    (WebCore::FontFaceSet::size):
+    (WebCore::FontFaceSet::check):
+    (WebCore::FontFaceSet::status const):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-05  Myles C. Maxfield  <[email protected]>
+
+            Remove unnecessary uses of Ref protect = m_backing from FontFaceSet
+            https://bugs.webkit.org/show_bug.cgi?id=229911
+
+            Reviewed by Anders Carlsson.
+
+            The only callers of these are from JS. So, JS will maintain a ref to
+            the FontFaceSet, and the FontFaceSet will maintain a ref to its
+            CSSFontFaceSet. So it doesn't need to be protected.
+
+            No new tests because there is no behavior change.
+
+            * css/FontFaceSet.cpp:
+            (WebCore::FontFaceSet::size):
+            (WebCore::FontFaceSet::check):
+            (WebCore::FontFaceSet::status const):
+
+2021-09-16  Russell Epstein  <[email protected]>
+
         Cherry-pick r282017. rdar://problem/83183644
 
     @font-face rules accessed over file: urls to a file which does not exist are not visible to document.fonts

Modified: branches/safari-612-branch/Source/WebCore/css/FontFaceSet.cpp (282586 => 282587)


--- branches/safari-612-branch/Source/WebCore/css/FontFaceSet.cpp	2021-09-16 18:49:15 UTC (rev 282586)
+++ branches/safari-612-branch/Source/WebCore/css/FontFaceSet.cpp	2021-09-16 18:49:18 UTC (rev 282587)
@@ -114,9 +114,8 @@
 
 size_t FontFaceSet::size()
 {
-    auto protect = m_backing;
-    protect->updateStyleIfNeeded();
-    return protect->faceCount();
+    m_backing->updateStyleIfNeeded();
+    return m_backing->faceCount();
 }
 
 ExceptionOr<FontFaceSet&> FontFaceSet::add(FontFace& face)
@@ -191,17 +190,15 @@
 
 ExceptionOr<bool> FontFaceSet::check(const String& family, const String& text)
 {
-    Ref protect = m_backing;
-    protect->updateStyleIfNeeded();
-    return protect->check(family, text);
+    m_backing->updateStyleIfNeeded();
+    return m_backing->check(family, text);
 }
     
 auto FontFaceSet::status() const -> LoadStatus
 {
-    Ref protect = m_backing;
-    protect->updateStyleIfNeeded();
+    m_backing->updateStyleIfNeeded();
 
-    switch (protect->status()) {
+    switch (m_backing->status()) {
     case CSSFontFaceSet::Status::Loading:
         return LoadStatus::Loading;
     case CSSFontFaceSet::Status::Loaded:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to