[string] handle strings sliced from externalized one-byte strings
...in Runtime_StringToArray. When a string is sliced from an externalized two-byte string that has only one-byte chars, String::IsFlat() and should not call ToOneByteVector() on it and instead we should use String: :IsOneByteRepresentation() can both be true, while FlatContent: :IsOneByte() returns false. In this case we String: :Get() to get the individual characters. Bug: chromium:1350270 Change-Id: I735408602072279f09b32e1997c97b2900942bdd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813070Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#82268}
Showing
Please
register
or
sign in
to comment