X Tutup
The Wayback Machine - https://web.archive.org/web/20210828192532/https://github.com/nodejs/node/commit/6f9cbcf6a6
Skip to content
Permalink
Browse files
src: fix v8 api deprecation
PR-URL: #35700
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
  • Loading branch information
gengjiawen authored and targos committed Nov 15, 2020
1 parent b9ce4b4 commit 6f9cbcf6a6645752d5bdedab2bdccea5d458110d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/node_file.cc
@@ -1944,7 +1944,7 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
auto ext = string->GetExternalOneByteStringResource();
buf = const_cast<char*>(ext->data());
len = ext->length();
} else if (enc == UCS2 && IsLittleEndian() && string->IsExternal()) {
} else if (enc == UCS2 && IsLittleEndian() && string->IsExternalTwoByte()) {
auto ext = string->GetExternalStringResource();
buf = reinterpret_cast<char*>(const_cast<uint16_t*>(ext->data()));
len = ext->length() * sizeof(*ext->data());

0 comments on commit 6f9cbcf

Please sign in to comment.
X Tutup