diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-11 16:52:07 +0200 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-10-12 02:09:46 +0400 |
commit | 5fdff3854a4253681fb10aa626c8971e50834c10 (patch) | |
tree | baa8b219fff28467b641d4f4f36a5b090f6cc6b2 /src/node_stat_watcher.cc | |
parent | 75a461d0997e0a040c2194c5309c148f179563e9 (diff) | |
download | node-new-5fdff3854a4253681fb10aa626c8971e50834c10.tar.gz |
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/node_stat_watcher.cc')
-rw-r--r-- | src/node_stat_watcher.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index 731740350c..3d6c4b189d 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -27,7 +27,6 @@ #include "util.h" #include "util-inl.h" -#include <assert.h> #include <string.h> #include <stdlib.h> @@ -85,7 +84,7 @@ void StatWatcher::Callback(uv_fs_poll_t* handle, const uv_stat_t* prev, const uv_stat_t* curr) { StatWatcher* wrap = static_cast<StatWatcher*>(handle->data); - assert(wrap->watcher_ == handle); + CHECK_EQ(wrap->watcher_, handle); Environment* env = wrap->env(); HandleScope handle_scope(env->isolate()); Context::Scope context_scope(env->context()); @@ -99,14 +98,14 @@ void StatWatcher::Callback(uv_fs_poll_t* handle, void StatWatcher::New(const FunctionCallbackInfo<Value>& args) { - assert(args.IsConstructCall()); + CHECK(args.IsConstructCall()); Environment* env = Environment::GetCurrent(args.GetIsolate()); new StatWatcher(env, args.This()); } void StatWatcher::Start(const FunctionCallbackInfo<Value>& args) { - assert(args.Length() == 3); + CHECK_EQ(args.Length(), 3); StatWatcher* wrap = Unwrap<StatWatcher>(args.Holder()); node::Utf8Value path(args[0]); |