Bug 188171 - [macOS] All WindowServer connections should be closed before denying WindowServer access.
Summary: [macOS] All WindowServer connections should be closed before denying WindowSe...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
Depends on:
Reported: 2018-07-30 10:15 PDT by Per Arne Vollan
Modified: 2019-09-03 08:14 PDT (History)
3 users (show)

See Also:

Patch (2.31 KB, patch)
2018-07-30 10:19 PDT, Per Arne Vollan
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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