0
0
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:
Ben Noordhuis 2017-10-25 10:02:54 +02:00 committed by Anna Henningsen
parent a4e46df87f
commit 7c3d6ccbf2
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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);