Skip to content

Commit

Permalink
src: remove superfluous HandleScope
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Aug 22, 2014
1 parent 317f4a1 commit 574461e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/handle_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,14 @@ void HandleWrap::OnClose(uv_handle_t* handle) {
HandleWrap* wrap = static_cast<HandleWrap*>(handle->data);
Environment* env = wrap->env();
HandleScope scope(env->isolate());
Context::Scope context_scope(env->context());

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

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

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

if (wrap->flags_ & kCloseCallback) {
Expand Down

0 comments on commit 574461e

Please sign in to comment.