Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c01c72b

Browse filesBrowse files
targosaduh95
authored andcommitted
benchmark: use non-deprecated WriteUtf8V2 method
PR-URL: #60173 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 80fdb3d commit c01c72b
Copy full SHA for c01c72b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎benchmark/napi/function_args/binding.cc‎

Copy file name to clipboardExpand all lines: benchmark/napi/function_args/binding.cc
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ void CallWithString(const FunctionCallbackInfo<Value>& args) {
2323
Local<String> str = args[0].As<String>();
2424
const size_t length = str->Utf8LengthV2(args.GetIsolate()) + 1;
2525
char* buf = new char[length];
26-
str->WriteUtf8(args.GetIsolate(), buf, length);
26+
str->WriteUtf8V2(
27+
args.GetIsolate(), buf, length, String::WriteFlags::kNullTerminate);
2728
delete[] buf;
2829
}
2930
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.