Skip to content

Commit 6f9cbcf

Browse files
gengjiawentargos
authored andcommitted
src: fix v8 api deprecation
PR-URL: #35700 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Shelley Vohr <[email protected]>
1 parent b9ce4b4 commit 6f9cbcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/node_file.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,7 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
19441944
auto ext = string->GetExternalOneByteStringResource();
19451945
buf = const_cast<char*>(ext->data());
19461946
len = ext->length();
1947-
} else if (enc == UCS2 && IsLittleEndian() && string->IsExternal()) {
1947+
} else if (enc == UCS2 && IsLittleEndian() && string->IsExternalTwoByte()) {
19481948
auto ext = string->GetExternalStringResource();
19491949
buf = reinterpret_cast<char*>(const_cast<uint16_t*>(ext->data()));
19501950
len = ext->length() * sizeof(*ext->data());

0 commit comments

Comments
 (0)