Bug 188171

Summary: [macOS] All WindowServer connections should be closed before denying WindowServer access.
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebKit Misc.Assignee: Per Arne Vollan <pvollan>
Status: NEW ---    
Severity: Normal CC: ajuma, bfulgham, darin
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Per Arne Vollan 2018-07-30 10:15:46 PDT
All WindowServer connections in the WebContent process should be closed before denying access to the WindowServer, otherwise calling CGSSetDenyWindowServerConnections(true) will fail. Currently, there are no open WindowServer connections at this point, but this might change in the future. We should call CGSShutdownServerConnections() before calling CGSSetDenyWindowServerConnections(true) to make sure WindowServer connections are always successfully denied. Thanks to Alex Gaynor at Mozilla (agaynor@mozilla.com) for identifying this issue.
Comment 1 Per Arne Vollan 2018-07-30 10:19:20 PDT
Created attachment 346066 [details]
Patch
Comment 2 Per Arne Vollan 2018-08-03 08:49:17 PDT
Thanks for reviewing!
Comment 3 Ali Juma 2019-09-03 08:14:32 PDT
Just wondering if you're still planning on landing this patch, and if this might prevent error output like the following:

FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL