Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit bc0415d

Browse files
committed
src: remove superfluous HandleScope
1 parent 1e3c04f commit bc0415d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/handle_wrap.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,14 @@ void HandleWrap::OnClose(uv_handle_t* handle) {
114114
HandleWrap* wrap = static_cast<HandleWrap*>(handle->data);
115115
Environment* env = wrap->env();
116116
HandleScope scope(env->isolate());
117+
Context::Scope context_scope(env->context());
117118

118119
// The wrap object should still be there.
119120
assert(wrap->persistent().IsEmpty() == false);
120121

121122
// But the handle pointer should be gone.
122123
assert(wrap->handle__ == NULL);
123124

124-
HandleScope handle_scope(env->isolate());
125-
Context::Scope context_scope(env->context());
126125
Local<Object> object = wrap->object();
127126

128127
if (wrap->flags_ & kCloseCallback) {

0 commit comments

Comments
 (0)