You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 085941a
Browse filesBrowse the repository at this point in the historyBrowse files
StreamBase::WriteString() created a String::ValueView twice, the first
time in StringBytes::StorageSize() only to read the length. A ValueView
flattens the string, so writing a string built by concatenation, such
as the header of an HTTP response, allocated a flat copy on the V8 heap
before copying it again into the write buffer.
Read the length from the string in StorageSize(), and copy one-byte
strings that fit the stack buffer with String::WriteOneByte(), which
does not flatten. For UTF-8 the characters go to the last third of the
buffer and are converted into the rest of it: a Latin-1 character takes
at most two bytes.
Assisted-by: Claude
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: #67435
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
0 commit comments