Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0be71db6a0fd7c8d70790518ec8ba38870e92aca
https://github.com/WebKit/WebKit/commit/0be71db6a0fd7c8d70790518ec8ba38870e92aca
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
M Source/WebCore/loader/DocumentThreadableLoader.cpp
M Source/WebCore/loader/DocumentThreadableLoader.h
Log Message:
-----------
Reduce sizeof(DocumentThreadableLoader) by grouping its one-byte members
https://bugs.webkit.org/show_bug.cgi?id=322896
rdar://186149141
Reviewed by Chris Dumez.
DocumentThreadableLoader declared its six one-byte members
(m_responsesCanBeOpaque, m_sameOriginRequest, m_simpleRequest, m_async,
m_delayCallbacksForIntegrityCheck, and the enum class : bool
m_shouldLogError) interleaved with 8-byte-aligned RefPtr/String/
unique_ptr/optional members. That scattered them across three separate
slots, each leaving alignment padding, and inflated the object.
Move all six one-byte members to the end of the member list so their
padding coalesces into a single slot, and reorder the constructor
initializer list to match the new declaration order (no -Wreorder). The
initialization is unaffected: m_sameOriginRequest still reads m_origin
and m_delayCallbacksForIntegrityCheck still reads m_options.integrity,
both of which remain initialized ahead of the grouped members.
sizeof(DocumentThreadableLoader) shrinks by 16 bytes on all 64-bit
targets (4 bytes on 32-bit); no behavior change.
* Source/WebCore/loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
* Source/WebCore/loader/DocumentThreadableLoader.h:
Canonical link: https://commits.webkit.org/320314@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications