mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
src: remove superfluous HandleScope
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't need to create one explicitly. PR-URL: https://github.com/nodejs/node/pull/16482 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
a4e46df87f
commit
7c3d6ccbf2
@ -169,7 +169,6 @@ void UDPWrap::New(const FunctionCallbackInfo<Value>& args) {
|
||||
void UDPWrap::GetFD(Local<String>, const PropertyCallbackInfo<Value>& args) {
|
||||
int fd = UV_EBADF;
|
||||
#if !defined(_WIN32)
|
||||
HandleScope scope(args.GetIsolate());
|
||||
UDPWrap* wrap = Unwrap<UDPWrap>(args.Holder());
|
||||
if (wrap != nullptr)
|
||||
uv_fileno(reinterpret_cast<uv_handle_t*>(&wrap->handle_), &fd);
|
||||
|
Loading…
Reference in New Issue
Block a user