Reland "[factory] Make NewByteArray return canonical empty byte array"
This is a reland of 8d3c8093 to make UBsan happy: memcopy (and therefore MemCopy) seems to expect a non-null src even when the given size is 0, so avoid calling it in that case. Original change's description: > [factory] Make NewByteArray return canonical empty byte array > > ... for length = 0, analogously to what e.g. NewFixedArray does. > > Simplify some call sites that had special handling for this case > (there are others that didn't). > > Change-Id: Ib3de5506300e967aca072fad53df7ab04ef68839 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009225 > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Georg Neis <neis@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75629} Change-Id: Ib8dc471d63a4b11b846e9d436555a3615902b66f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3014456Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#75642}
Showing
Please
register
or
sign in
to comment