diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-11 18:52:07 +0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-10-12 02:09:46 +0400 |
commit | 5fdff3854a4253681fb10aa626c8971e50834c10 (patch) | |
tree | baa8b219fff28467b641d4f4f36a5b090f6cc6b2 /src/handle_wrap.cc | |
parent | 75a461d0997e0a040c2194c5309c148f179563e9 (diff) |
src: replace assert() with CHECK()
Mechanically replace assert() statements with UNREACHABLE(), CHECK(),
or CHECK_{EQ,NE,LT,GT,LE,GE}() statements.
The exceptions are src/node.h and src/node_object_wrap.h because they
are public headers.
PR-URL: https://github.com/node-forward/node/pull/16
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'src/handle_wrap.cc')
-rw-r--r-- | src/handle_wrap.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index eeda93017fd..403b61ac989 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -69,7 +69,7 @@ void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) { if (wrap == NULL || wrap->handle__ == NULL) return; - assert(!wrap->persistent().IsEmpty()); + CHECK_EQ(false, wrap->persistent().IsEmpty()); uv_close(wrap->handle__, OnClose); wrap->handle__ = NULL; @@ -95,7 +95,7 @@ HandleWrap::HandleWrap(Environment* env, HandleWrap::~HandleWrap() { - assert(persistent().IsEmpty()); + CHECK(persistent().IsEmpty()); QUEUE_REMOVE(&handle_wrap_queue_); } @@ -106,10 +106,10 @@ void HandleWrap::OnClose(uv_handle_t* handle) { HandleScope scope(env->isolate()); // The wrap object should still be there. - assert(wrap->persistent().IsEmpty() == false); + CHECK_EQ(wrap->persistent().IsEmpty(), false); // But the handle pointer should be gone. - assert(wrap->handle__ == NULL); + CHECK_EQ(wrap->handle__, NULL); HandleScope handle_scope(env->isolate()); Context::Scope context_scope(env->context()); |