• Andy Wingo's avatar
    [stringrefs] Fix array-to-string instruction · 995063d1
    Andy Wingo authored
    To make an array from a string, we were passing an interior pointer to
    the array's contents to NewStringFromUtf8 -- but the allocation could
    cause that interior pointer to become invalid.
    
    As part of the fix, also start to refactor to put the notion of UTF-8
    variants closer to unibrow.  This will allow us to unify more
    UTF-8/WTF-8/sloppy UTF-8 code paths.
    
    Bug: v8:12868, v8:13028, v8:13036
    Change-Id: I61f53a6882b5ebe1d0b38594412cb35ff0e28a94
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742701
    Commit-Queue: Andy Wingo <wingo@igalia.com>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#81536}
    995063d1
unicode.h 9.82 KB