Bug 239893 - ifdef out IPC::MessageName values that aren't applicable
Summary: ifdef out IPC::MessageName values that aren't applicable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Process Model (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-29 00:49 PDT by Cameron McCormack (:heycam)
Modified: 2022-12-19 00:18 PST (History)
2 users (show)

See Also:


Attachments

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