Add ProcessPrivilege assertions to places that access NSApp
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2018 03:50:17 +0000 (03:50 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2018 03:50:17 +0000 (03:50 +0000)
commit2335e6503a3718135fe24e3464e9a4935cd0ddf8
tree14e1bd66127c63034fa7f2dee4e3c859948d05e9
parent4193bbcc8c5ffceb8aa13e5c6fffad220277a9dc
Add ProcessPrivilege assertions to places that access NSApp
https://bugs.webkit.org/show_bug.cgi?id=184322
<rdar://problem/39194560>

Reviewed by Per Arne Vollan.

Add ProcessPrivilege assertions to places where we interact with NSApp so
that we can prevent accidentally using them in the WebContent process.

Source/WebCore:

* page/mac/EventHandlerMac.mm:
(WebCore::lastEventIsMouseUp):
(WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::setDragImage):

Source/WebKit:

* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::stopNSAppRunLoop):
* Shared/mac/HangDetectionDisablerMac.mm:
(WebKit::setClientsMayIgnoreEvents):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
(WebKit::WebViewImpl::validateUserInterfaceItem):
(WebKit::WebViewImpl::startSpeaking):
(WebKit::WebViewImpl::stopSpeaking):
(WebKit::applicationFlagsForDrag):
(WebKit::WebViewImpl::doneWithKeyEvent):
* UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
(WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::enterFullscreen):
(WebKit::PluginProcessProxy::beginModal):
(WebKit::PluginProcessProxy::endModal):
* UIProcess/mac/DisplayLink.cpp:
(WebKit::DisplayLink::DisplayLink):
(WebKit::DisplayLink::~DisplayLink):
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::setCursor):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::getIsSpeaking):
(WebKit::WebPageProxy::speak):
(WebKit::WebPageProxy::stopSpeaking):
(WebKit::WebPageProxy::startDisplayLink):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/mac/EventHandlerMac.mm
Source/WebCore/platform/mac/EventLoopMac.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebKit/ChangeLog
Source/WebKit/Shared/mac/ChildProcessMac.mm
Source/WebKit/Shared/mac/HangDetectionDisablerMac.mm
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm
Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
Source/WebKit/UIProcess/mac/DisplayLink.cpp
Source/WebKit/UIProcess/mac/PageClientImplMac.mm
Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm