Skip to content

Commit 39ce902

Browse files
geeksilva97ruyadorno
authored andcommitted
doc: fix c++ addon hello world sample
PR-URL: #56172 Refs: #56173 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: theanarkh <[email protected]>
1 parent d6e1efc commit 39ce902

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/addons.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,15 @@ namespace demo {
7272
using v8::FunctionCallbackInfo;
7373
using v8::Isolate;
7474
using v8::Local;
75+
using v8::NewStringType;
7576
using v8::Object;
7677
using v8::String;
7778
using v8::Value;
7879

7980
void Method(const FunctionCallbackInfo<Value>& args) {
8081
Isolate* isolate = args.GetIsolate();
8182
args.GetReturnValue().Set(String::NewFromUtf8(
82-
isolate, "world").ToLocalChecked());
83+
isolate, "world", NewStringType::kNormal).ToLocalChecked());
8384
}
8485

8586
void Initialize(Local<Object> exports) {

0 commit comments

Comments
 (0)