node-api: use WriteV2 in napi_get_value_string_utf16 · nodejs/node@429c38d · GitHub
Skip to content

Commit 429c38d

Browse files
tniessentargos
authored andcommitted
node-api: use WriteV2 in napi_get_value_string_utf16
Since `String::Write()` is deprecated, use `String::Write2()` instead. That requires us to compute the correct number of characters ahead of time but removes the need for dealing with the return value. PR-URL: #58165 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 7ff3718 commit 429c38d

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/js_native_api_v8.cc

Lines changed: 10 additions & 8 deletions

0 commit comments

Comments
 (0)