Skip to content

Commit

Permalink
src: remove superfluous HandleScope
Browse files Browse the repository at this point in the history
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #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>
  • Loading branch information
bnoordhuis authored and gibfahn committed Oct 30, 2017
1 parent 84ad50e commit 03fae41
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/udp_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 03fae41

Please sign in to comment.