Skip to content

Commit 114a3e5

Browse files
geeksilva97aduh95
authored andcommitted
doc: fix c++ addon hello world sample
PR-URL: #56172 Refs: #56173 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: theanarkh <theratliter@gmail.com>
1 parent 28a4b6f commit 114a3e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/addons.md

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy