Bug 267111

Summary: Improve overflow handing ergonomics in JSStringJoiner::append().
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Mark Lam
Reported 2024-01-04 17:32:34 PST
Currently, JSStringJoiner::append() appends to its m_string Vector. As a result, if an overflow is imminent, it crashes. We change the code to use tryAppend() instead and remember if an overflow was detected. If so, JSStringJoiner::join() can throw an OutOfMemory error later. rdar://120389377
Attachments
Mark Lam
Comment 1 2024-01-04 17:49:23 PST
EWS
Comment 2 2024-01-05 08:27:39 PST
Committed 272688@main (21dd74926ee0): <https://commits.webkit.org/272688@main> Reviewed commits have been landed. Closing PR #22412 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.