mirror of https://github.com/nodejs/node.git
doc: fix c++ addon hello world sample
PR-URL: https://github.com/nodejs/node/pull/56172 Refs: https://github.com/nodejs/node/issues/56173 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: theanarkh <theratliter@gmail.com>pull/48479/merge
parent
80c0055e38
commit
0a7eeb5068
|
@ -72,6 +72,7 @@ namespace demo {
|
|||
using v8::FunctionCallbackInfo;
|
||||
using v8::Isolate;
|
||||
using v8::Local;
|
||||
using v8::NewStringType;
|
||||
using v8::Object;
|
||||
using v8::String;
|
||||
using v8::Value;
|
||||
|
@ -79,7 +80,7 @@ using v8::Value;
|
|||
void Method(const FunctionCallbackInfo<Value>& args) {
|
||||
Isolate* isolate = args.GetIsolate();
|
||||
args.GetReturnValue().Set(String::NewFromUtf8(
|
||||
isolate, "world").ToLocalChecked());
|
||||
isolate, "world", NewStringType::kNormal).ToLocalChecked());
|
||||
}
|
||||
|
||||
void Initialize(Local<Object> exports) {
|
||||
|
|
Loading…
Reference in New Issue