Title: [233816] trunk/Source/WebCore
- Revision
- 233816
- Author
- rn...@webkit.org
- Date
- 2018-07-13 13:56:36 -0700 (Fri, 13 Jul 2018)
Log Message
[iOS] [WK1] Crash inside IOSurfacePool::platformGarbageCollectNow() in WebThread
https://bugs.webkit.org/show_bug.cgi?id=187635
<rdar://problem/34297065>
Reviewed by Simon Fraser.
r167717 added code to trigger a CA commit in the web process via platformGarbageCollectNow() in order to free IOSurface-related memory.
However, that code is also running in the web thread in apps using WebKit1, causing unwanted UIView layout on the web thread.
Fix by not triggering this CA commit if it's called on the web thread.
* platform/graphics/cocoa/IOSurfacePoolCocoa.mm:
(WebCore::IOSurfacePool::platformGarbageCollectNow):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (233815 => 233816)
--- trunk/Source/WebCore/ChangeLog 2018-07-13 20:40:45 UTC (rev 233815)
+++ trunk/Source/WebCore/ChangeLog 2018-07-13 20:56:36 UTC (rev 233816)
@@ -1,3 +1,19 @@
+2018-07-13 Ryosuke Niwa <rn...@webkit.org>
+
+ [iOS] [WK1] Crash inside IOSurfacePool::platformGarbageCollectNow() in WebThread
+ https://bugs.webkit.org/show_bug.cgi?id=187635
+ <rdar://problem/34297065>
+
+ Reviewed by Simon Fraser.
+
+ r167717 added code to trigger a CA commit in the web process via platformGarbageCollectNow() in order to free IOSurface-related memory.
+ However, that code is also running in the web thread in apps using WebKit1, causing unwanted UIView layout on the web thread.
+
+ Fix by not triggering this CA commit if it's called on the web thread.
+
+ * platform/graphics/cocoa/IOSurfacePoolCocoa.mm:
+ (WebCore::IOSurfacePool::platformGarbageCollectNow):
+
2018-07-13 Antoine Quint <grao...@apple.com>
Dark Mode: document markers are difficult to see
Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurfacePoolCocoa.mm (233815 => 233816)
--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurfacePoolCocoa.mm 2018-07-13 20:40:45 UTC (rev 233815)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurfacePoolCocoa.mm 2018-07-13 20:56:36 UTC (rev 233816)
@@ -34,6 +34,10 @@
void IOSurfacePool::platformGarbageCollectNow()
{
+ if (isWebThread())
+ return;
+
+ // We need to trigger a CA commit in the web process to trigger the release layer-related memory, since the WebProcess doesn't normally do CA commits.
[CATransaction begin];
[CATransaction commit];
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes