Title: [257657] trunk/Source/WebCore
Revision
257657
Author
[email protected]
Date
2020-02-28 13:39:06 -0800 (Fri, 28 Feb 2020)

Log Message

Clear FontDatabase when low-memory-warning happens
https://bugs.webkit.org/show_bug.cgi?id=208389

Reviewed by Chris Dumez.

FontDatabase can monotonically increase. We should clear it when low-memory-warning happens.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::platformPurgeInactiveFontData):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (257656 => 257657)


--- trunk/Source/WebCore/ChangeLog	2020-02-28 21:35:09 UTC (rev 257656)
+++ trunk/Source/WebCore/ChangeLog	2020-02-28 21:39:06 UTC (rev 257657)
@@ -1,3 +1,15 @@
+2020-02-28  Chris Dumez  <[email protected]> and Yusuke Suzuki  <[email protected]>
+
+        Clear FontDatabase when low-memory-warning happens
+        https://bugs.webkit.org/show_bug.cgi?id=208389
+
+        Reviewed by Chris Dumez.
+
+        FontDatabase can monotonically increase. We should clear it when low-memory-warning happens.
+
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::FontCache::platformPurgeInactiveFontData):
+
 2020-02-28  Takashi Komori  <[email protected]>
 
         [Curl] Add TLS debugging feature to log encryption keys

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (257656 => 257657)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-02-28 21:35:09 UTC (rev 257656)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-02-28 21:39:06 UTC (rev 257657)
@@ -1381,6 +1381,9 @@
     }
     for (auto& font : toRemove)
         fallbackDedupSet().remove(font);
+
+    FontDatabase::singletonAllowingUserInstalledFonts().clear();
+    FontDatabase::singletonDisallowingUserInstalledFonts().clear();
 }
 
 #if PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to