Title: [234674] trunk/Source/WebCore
Revision
234674
Author
[email protected]
Date
2018-08-07 15:17:27 -0700 (Tue, 07 Aug 2018)

Log Message

Prevent querying for renderer info for disconnected or uninitialized displays
https://bugs.webkit.org/show_bug.cgi?id=188387
<rdar://problem/42588769>

Patch by Justin Fan <[email protected]> on 2018-08-07
Reviewed by Simon Fraser.

Calling CGL functions with a NULL displayMask crashes the process.

No tests; requires multiple displays.

* platform/mac/PlatformScreenMac.mm:
(WebCore::collectScreenProperties):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234673 => 234674)


--- trunk/Source/WebCore/ChangeLog	2018-08-07 21:29:28 UTC (rev 234673)
+++ trunk/Source/WebCore/ChangeLog	2018-08-07 22:17:27 UTC (rev 234674)
@@ -1,3 +1,18 @@
+2018-08-07  Justin Fan  <[email protected]>
+
+        Prevent querying for renderer info for disconnected or uninitialized displays
+        https://bugs.webkit.org/show_bug.cgi?id=188387
+        <rdar://problem/42588769>
+
+        Reviewed by Simon Fraser.
+
+        Calling CGL functions with a NULL displayMask crashes the process.
+
+        No tests; requires multiple displays.
+
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::collectScreenProperties):
+
 2018-08-06  Ryosuke Niwa  <[email protected]>
 
         document.open and document.write must throw while the HTML parser is synchronously constructing a custom element

Modified: trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm (234673 => 234674)


--- trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2018-08-07 21:29:28 UTC (rev 234673)
+++ trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2018-08-07 22:17:27 UTC (rev 234674)
@@ -130,7 +130,8 @@
         IORegistryGPUID gpuID = 0;
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
-        gpuID = gpuIDForDisplayMask(displayMask);
+        if (displayMask)
+            gpuID = gpuIDForDisplayMask(displayMask);
 #endif
 
         screenProperties.screenDataMap.set(displayID, ScreenData { screenAvailableRect, screenRect, colorSpace, screenDepth, screenDepthPerComponent, screenSupportsExtendedColor, screenHasInvertedColors, screenIsMonochrome, displayMask, gpuID });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to