Title: [290618] trunk/Source/WebCore
Revision
290618
Author
pvol...@apple.com
Date
2022-02-28 15:26:38 -0800 (Mon, 28 Feb 2022)

Log Message

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278

Reviewed by Darin Adler.

Remove release assert in IOSurface::bytesPerRowAlignment() when UI process is blocking IOSurface IOKit access.
Instead, log this event, and return an appropriate value.

* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::bytesPerRowAlignment):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (290617 => 290618)


--- trunk/Source/WebCore/ChangeLog	2022-02-28 23:24:21 UTC (rev 290617)
+++ trunk/Source/WebCore/ChangeLog	2022-02-28 23:26:38 UTC (rev 290618)
@@ -1,3 +1,16 @@
+2022-02-28  Per Arne Vollan  <pvol...@apple.com>
+
+        Remove release assert when UI process is blocking IOSurface IOKit access
+        https://bugs.webkit.org/show_bug.cgi?id=237278
+
+        Reviewed by Darin Adler.
+
+        Remove release assert in IOSurface::bytesPerRowAlignment() when UI process is blocking IOSurface IOKit access.
+        Instead, log this event, and return an appropriate value.
+
+        * platform/graphics/cocoa/IOSurface.mm:
+        (WebCore::IOSurface::bytesPerRowAlignment):
+
 2022-02-28  Chris Dumez  <cdu...@apple.com>
 
         Unreviewed, address feedback from Darin regarding r290610.

Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (290617 => 290618)


--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2022-02-28 23:24:21 UTC (rev 290617)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2022-02-28 23:26:38 UTC (rev 290618)
@@ -293,7 +293,11 @@
         // See https://developer.apple.com/documentation/iosurface/1419453-iosurfacegetpropertyalignment?language=objc
         // This likely means that the sandbox is blocking access to the IOSurface IOKit class,
         // and that IOSurface::bytesPerRowAlignment() has been called before IOSurface::setBytesPerRowAlignment.
-        RELEASE_ASSERT(alignment > 1);
+        if (alignment <= 1) {
+            RELEASE_LOG_FAULT(Layers, "Sandbox does not allow IOSurface IOKit access.");
+            // 64 bytes is currently the alignment on all platforms.
+            alignment = 64;
+        }
     }
     return alignment;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to