Title: [218643] trunk
Revision
218643
Author
[email protected]
Date
2017-06-21 12:49:11 -0700 (Wed, 21 Jun 2017)

Log Message

[iOS] Ensure that GraphicsServices is initialized before calling GSFontPurgeFontCache().
https://bugs.webkit.org/show_bug.cgi?id=173616
<rdar://problem/30780050>

Reviewed by Chris Dumez.

Source/WebCore:

Fix for crash in GSFontPurgeFontCache() seen in apps embedding WebKit.
Ensure GSFontInitialize() has been called first, since the former depends on state
set up by this function.

* page/cocoa/MemoryReleaseCocoa.mm:
(WebCore::platformReleaseMemory):
* platform/spi/ios/GraphicsServicesSPI.h:

WebKitLibraries:

* WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (218642 => 218643)


--- trunk/Source/WebCore/ChangeLog	2017-06-21 18:54:45 UTC (rev 218642)
+++ trunk/Source/WebCore/ChangeLog	2017-06-21 19:49:11 UTC (rev 218643)
@@ -1,3 +1,19 @@
+2017-06-21  Andreas Kling  <[email protected]>
+
+        [iOS] Ensure that GraphicsServices is initialized before calling GSFontPurgeFontCache().
+        https://bugs.webkit.org/show_bug.cgi?id=173616
+        <rdar://problem/30780050>
+
+        Reviewed by Chris Dumez.
+
+        Fix for crash in GSFontPurgeFontCache() seen in apps embedding WebKit.
+        Ensure GSFontInitialize() has been called first, since the former depends on state
+        set up by this function.
+
+        * page/cocoa/MemoryReleaseCocoa.mm:
+        (WebCore::platformReleaseMemory):
+        * platform/spi/ios/GraphicsServicesSPI.h:
+
 2017-06-21  Antoine Quint  <[email protected]>
 
         Add logging to identify when the Page suspends scripted animations

Modified: trunk/Source/WebCore/page/cocoa/MemoryReleaseCocoa.mm (218642 => 218643)


--- trunk/Source/WebCore/page/cocoa/MemoryReleaseCocoa.mm	2017-06-21 18:54:45 UTC (rev 218642)
+++ trunk/Source/WebCore/page/cocoa/MemoryReleaseCocoa.mm	2017-06-21 19:49:11 UTC (rev 218643)
@@ -43,6 +43,8 @@
 void platformReleaseMemory(Critical)
 {
 #if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
+    // FIXME: Remove this call to GSFontInitialize() once <rdar://problem/32886715> is fixed.
+    GSFontInitialize();
     GSFontPurgeFontCache();
 #endif
 

Modified: trunk/Source/WebCore/platform/spi/ios/GraphicsServicesSPI.h (218642 => 218643)


--- trunk/Source/WebCore/platform/spi/ios/GraphicsServicesSPI.h	2017-06-21 18:54:45 UTC (rev 218642)
+++ trunk/Source/WebCore/platform/spi/ios/GraphicsServicesSPI.h	2017-06-21 19:49:11 UTC (rev 218643)
@@ -41,6 +41,7 @@
 void GSInitialize(void);
 uint64_t GSCurrentEventTimestamp(void);
 CFStringRef GSSystemRootDirectory(void);
+void GSFontInitialize(void);
 void GSFontPurgeFontCache(void);
 
 WTF_EXTERN_C_END

Modified: trunk/WebKitLibraries/ChangeLog (218642 => 218643)


--- trunk/WebKitLibraries/ChangeLog	2017-06-21 18:54:45 UTC (rev 218642)
+++ trunk/WebKitLibraries/ChangeLog	2017-06-21 19:49:11 UTC (rev 218643)
@@ -1,3 +1,13 @@
+2017-06-21  Andreas Kling  <[email protected]>
+
+        [iOS] Ensure that GraphicsServices is initialized before calling GSFontPurgeFontCache().
+        https://bugs.webkit.org/show_bug.cgi?id=173616
+        <rdar://problem/30780050>
+
+        Reviewed by Chris Dumez.
+
+        * WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd:
+
 2017-06-09  Lucas Forschler  <[email protected]>
 
         <rdar://problem/32683422>

Modified: trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd (218642 => 218643)


--- trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd	2017-06-21 18:54:45 UTC (rev 218642)
+++ trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd	2017-06-21 19:49:11 UTC (rev 218643)
@@ -11,6 +11,7 @@
       - arm64
     symbols:
       - _GSCurrentEventTimestamp
+      - _GSFontInitialize
       - _GSFontPurgeFontCache
       - _GSInitialize
       - _GSSystemRootDirectory
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to