WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
312803
API::PageConfiguration::Data::LazyInitializedRef wastefully initializes unneeded objects
https://bugs.webkit.org/show_bug.cgi?id=312803
Summary
API::PageConfiguration::Data::LazyInitializedRef wastefully initializes unnee...
Brent Fulgham
Reported
2026-04-20 13:10:06 PDT
The copy assignment operator for Data::LazyInitializedRef (APIPageConfiguration.h (Line 504:)) triggers an initialization by calling `get()` on the source object: void operator=(const LazyInitializedRef& other) { m_value = other.get(); } This triggers lazy initialization on the source `m_value` for ANY uninitialized member. During `copyDataFrom`, the Data struct's generated copy assignment calls this for ALL 5 LazyInitializedRef members. For members NOT explicitly set on the source (e.g., visitedLinkStore, defaultWebsitePolicies), this causes us to create throw-away objects as a side-effect of copying. While this doesn't create any user-facing bug, it does involve allocating/deallocating up to 5 objects for each copy (e.g., during IPC) which uses power and costs us performance.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-04-20 13:10:23 PDT
<
rdar://problem/175189199
>
Brent Fulgham
Comment 2
2026-04-20 14:13:47 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/63153
EWS
Comment 3
2026-04-27 13:42:56 PDT
Committed
312140@main
(f84460ba474e): <
https://commits.webkit.org/312140@main
> Reviewed commits have been landed. Closing PR #63153 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug