Convert ProcessPrivilege assertions to regular debug-only assertions
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 May 2018 20:20:35 +0000 (20:20 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 May 2018 20:20:35 +0000 (20:20 +0000)
commit3bb4701b036943e963be850182b5493440e6fd8f
tree0dbf9092b63e698763431386dd997aef411e9d4d
parent9d7007b32e678ac5eded480399e69daf7c223a78
Convert ProcessPrivilege assertions to regular debug-only assertions
https://bugs.webkit.org/show_bug.cgi?id=185775
<rdar://problem/40372286>

Reviewed by Geoffrey Garen.

In Bug 184322 I added a number of RELEASE_ASSERT checks that certain
UI-only calls were not being made in the WebContent process.

Measurements have shown that these RELEASE_ASSERTs have regressed performance
by around 1% on some benchmarks, so we should convert them to normal asserts.

This patch changes the RELEASE_ASSERTs into ASSERTs.

Source/WebCore:

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::setDragImage):
* platform/mac/PlatformScreenMac.mm:
(WebCore::displayID):
(WebCore::firstScreen):
(WebCore::window):
(WebCore::screen):
(WebCore::getScreenProperties):
(WebCore::screenIsMonochrome):

Source/WebKit:

* 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/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@231980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/platform/mac/PlatformScreenMac.mm
Source/WebKit/ChangeLog
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/WebPageProxyMac.mm
Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm