Bug 262431

Summary: [Hardening] Make Vector::uncheckedAppend() an alias to Vector::append()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Chris Dumez
Reported 2023-09-29 21:47:18 PDT
Make Vector::uncheckedAppend() an alias to Vector::append() so that bounds checking happens. This is part of our effort to make our code safer. This tested as performance neutral on Speedometer, MotionMark and JetStream on various A/B bots. However, I plan to monitor the bots after landing to be safe. If it sticks, I'll follow-up to get rid of Vector::uncheckedAppend() completely. Note that in order to maintain the performance, WTF::map(), Vector::map(), copyToVector() & copyToVectorOf() still rely on a private unsafeAppendWithoutCapacityCheck() function.
Attachments
Chris Dumez
Comment 1 2023-09-29 21:52:28 PDT
EWS
Comment 2 2023-09-30 21:59:53 PDT
Committed 268700@main (1b624bea4bbb): <https://commits.webkit.org/268700@main> Reviewed commits have been landed. Closing PR #18458 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2023-09-30 22:00:15 PDT
Note You need to log in before you can comment on or make changes to this bug.