Skip to content

Commit

Permalink
doc: cast GetInternalField() return type to v8::Value in addons.md
Browse files Browse the repository at this point in the history
For the breaking change in
https://chromium-review.googlesource.com/c/v8/v8/+/4707972

PR-URL: nodejs#49439
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
joyeecheung authored and alexfernandez committed Nov 1, 2023
1 parent ee88bee commit 74c8884
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,8 @@ void MyObject::New(const FunctionCallbackInfo<Value>& args) {
const int argc = 1;
Local<Value> argv[argc] = { args[0] };
Local<Function> cons =
args.Data().As<Object>()->GetInternalField(0).As<Function>();
args.Data().As<Object>()->GetInternalField(0)
.As<Value>().As<Function>();
Local<Object> result =
cons->NewInstance(context, argc, argv).ToLocalChecked();
args.GetReturnValue().Set(result);
Expand Down

0 comments on commit 74c8884

Please sign in to comment.