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 39ce902

Browse filesBrowse files
geeksilva97ruyadorno
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 d6e1efc commit 39ce902
Copy full SHA for 39ce902

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

‎doc/api/addons.md‎

Copy file name to clipboardExpand all lines: doc/api/addons.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.