Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 546c35e035e767a2c868bd2261cb0ebdf786e49c
https://github.com/WebKit/WebKit/commit/546c35e035e767a2c868bd2261cb0ebdf786e49c
Author: Ahmad Saleem <[email protected]>
Date: 2026-10-12 (Mon, 12 Oct 2026)
Changed paths:
M Source/WebCore/dom/UserGestureIndicator.cpp
M Source/WebCore/dom/UserGestureIndicator.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Log Message:
-----------
UserGestureTokenData has 32 bytes of padding due to member ordering
https://bugs.webkit.org/show_bug.cgi?id=326760
rdar://189469555
Reviewed by Chris Dumez.
std::optional<WTF::UUID> is 16-byte aligned on platforms where UInt128 is
__uint128_t, and it was sandwiched between 1-byte fields, so the struct
carried 14 bytes of interior padding before it, 7 before startTime, and 13
bytes of tail padding. The std::optional engaged flag also pushed the member
itself to 32 bytes.
Store authorizationToken as Markable<WTF::UUID>, which uses UUID's reserved
empty value instead of a separate flag, and reorder the members
largest-alignment first: authorizationToken, startTime, then the six 1-byte
fields. This shrinks the struct from 80 to 32 bytes on 64-bit Darwin.
The IPC serialization order must match the declaration order, since the
generated decoder aggregate-initializes the struct, so update it as well.
No change in behavior.
* Source/WebCore/dom/UserGestureIndicator.cpp:
(WebCore::UserGestureToken::UserGestureToken):
* Source/WebCore/dom/UserGestureIndicator.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
Canonical link: https://commits.webkit.org/323440@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications