RESOLVED FIXED 184322
Add ProcessPrivilege assertions to places that access NSApp
https://bugs.webkit.org/show_bug.cgi?id=184322
Summary Add ProcessPrivilege assertions to places that access NSApp
Brent Fulgham
Reported 2018-04-04 17:12:03 PDT
Add new assertions to warn us if powerful API calls are used in the WbContent process. We have refactored the WebContent code to avoid calling into these routines, but we need to guard against re-introducing them in the future.
Attachments
Patch (18.85 KB, patch)
2018-04-04 17:16 PDT, Brent Fulgham
no flags
Archive of layout-test-results from ews107 for mac-sierra-wk2 (3.16 MB, application/zip)
2018-04-04 18:37 PDT, EWS Watchlist
no flags
Patch (27.18 KB, patch)
2018-04-05 10:19 PDT, Brent Fulgham
no flags
Patch (Rebased to current) (21.66 KB, patch)
2018-04-09 16:53 PDT, Brent Fulgham
pvollan: review+
Radar WebKit Bug Importer
Comment 1 2018-04-04 17:12:49 PDT
Brent Fulgham
Comment 2 2018-04-04 17:16:22 PDT
EWS Watchlist
Comment 3 2018-04-04 18:37:40 PDT
Comment on attachment 337244 [details] Patch Attachment 337244 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7210687 Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 4 2018-04-04 18:37:42 PDT
Created attachment 337250 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Brent Fulgham
Comment 5 2018-04-05 10:19:32 PDT
Brent Fulgham
Comment 6 2018-04-09 16:53:18 PDT
Created attachment 337559 [details] Patch (Rebased to current)
Per Arne Vollan
Comment 7 2018-04-09 20:11:54 PDT
Comment on attachment 337559 [details] Patch (Rebased to current) View in context: https://bugs.webkit.org/attachment.cgi?id=337559&action=review R=me. > Source/WebCore/platform/mac/PasteboardMac.mm:678 > + RELEASE_ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); I believe the method Pasteboard::setDragImage is still called from WebContent process. I think we can move this assert into the if statement.
Brent Fulgham
Comment 8 2018-04-09 20:41:02 PDT
Comment on attachment 337559 [details] Patch (Rebased to current) View in context: https://bugs.webkit.org/attachment.cgi?id=337559&action=review >> Source/WebCore/platform/mac/PasteboardMac.mm:678 >> + RELEASE_ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); > > I believe the method Pasteboard::setDragImage is still called from WebContent process. I think we can move this assert into the if statement. OK!
Brent Fulgham
Comment 9 2018-04-09 20:50:19 PDT
Saam Barati
Comment 10 2018-04-10 18:42:20 PDT
It seems like this change caused a 3% Kraken regression on Mac.
Brent Fulgham
Comment 11 2018-04-10 19:23:22 PDT
(In reply to Saam Barati from comment #10) > It seems like this change caused a 3% Kraken regression on Mac. Oh no! Please roll it out! Is it possible to identify which code paths are contributing to the slowdown? I can relays with normal DEBUG assertions.
Brent Fulgham
Comment 12 2018-04-10 19:50:27 PDT
Weakening some of these RELEASE_ASSERTS on hot code paths to normal ASSERTS: Committed r230512: <https://trac.webkit.org/changeset/230512/webkit>
Brent Fulgham
Comment 13 2018-04-10 21:22:37 PDT
Rolled out a change that still depends on Bug 184451: Committed r230514: <https://trac.webkit.org/changeset/230514/webkit>
Note You need to log in before you can comment on or make changes to this bug.