Bug 239893

Summary: ifdef out IPC::MessageName values that aren't applicable
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: WebKit Process ModelAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Cameron McCormack (:heycam) 2022-04-29 00:49:48 PDT
IPC::isMessageNameValue's compiled code is kind of complex, since there's bunch of values that return false for particular platforms and ENABLE & USE macros.  This function is called for every IPC message.  We can make it cheaper by ifdefing out the values in the enum declaration too, and make the function effectively "is messageName >= 1 && messageName <= lastMessageName".
Comment 1 Radar WebKit Bug Importer 2022-04-29 00:50:03 PDT
<rdar://problem/92511440>
Comment 2 Kimmo Kinnunen 2022-12-14 22:53:26 PST
IPC MessageName validation is slow
- Validated on decoding
- Debug builds validate on encoding
Comment 3 Kimmo Kinnunen 2022-12-14 23:04:01 PST
Pull request: https://github.com/WebKit/WebKit/pull/7672
Comment 4 EWS 2022-12-19 00:17:57 PST
Committed 258073@main (03178c5e0622): <https://commits.webkit.org/258073@main>

Reviewed commits have been landed. Closing PR #7672 and removing active labels.