update for node 21 (#1794)

Co-authored-by: mwilsnd <mwilsnd@gmail.com>
This commit is contained in:
Andrew Calcutt
2023-10-23 11:06:58 -04:00
committed by GitHub
parent da45706601
commit ae2c90719e
5 changed files with 55 additions and 24 deletions

View File

@@ -53,7 +53,10 @@ void NodeRequest::New(const Nan::FunctionCallbackInfo<v8::Value>& info) {
Nan::Set(info.This(), Nan::New("kind").ToLocalChecked(), info[4]);
v8::Local<v8::Value> argv[] = {info.This()};
request->asyncResource->runInAsyncScope(
Nan::To<v8::Object>(target->handle()->GetInternalField(1)).ToLocalChecked(), "request", 1, argv);
Nan::To<v8::Object>(target->handle()->GetInternalField(1).As<v8::Value>()).ToLocalChecked(),
"request",
1,
argv);
info.GetReturnValue().Set(info.This());
}