Title: [282049] trunk/Source/WebCore
- Revision
- 282049
- Author
- mmaxfi...@apple.com
- Date
- 2021-09-05 10:47:33 -0700 (Sun, 05 Sep 2021)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (282048 => 282049)
--- trunk/Source/WebCore/ChangeLog 2021-09-05 17:03:42 UTC (rev 282048)
+++ trunk/Source/WebCore/ChangeLog 2021-09-05 17:47:33 UTC (rev 282049)
@@ -1,3 +1,21 @@
+2021-09-05 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ 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-05 Alan Bujtas <za...@apple.com>
Ensure fragmented flow state invalidation even when the cached fragmented flow is not present.
Modified: trunk/Source/WebCore/css/FontFaceSet.cpp (282048 => 282049)
--- trunk/Source/WebCore/css/FontFaceSet.cpp 2021-09-05 17:03:42 UTC (rev 282048)
+++ trunk/Source/WebCore/css/FontFaceSet.cpp 2021-09-05 17:47:33 UTC (rev 282049)
@@ -112,9 +112,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)
@@ -188,17 +187,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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes