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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
bnoordhuis authored and gibfahn committed Oct 31, 2017
1 parent 77c02aa commit 3a54bb5
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 3a54bb5

Please sign in to comment.