summaryrefslogtreecommitdiff
path: root/src/fs_event_wrap.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-10-11 16:52:07 +0200
committerFedor Indutny <fedor@indutny.com>2014-10-12 02:09:46 +0400
commit5fdff3854a4253681fb10aa626c8971e50834c10 (patch)
treebaa8b219fff28467b641d4f4f36a5b090f6cc6b2 /src/fs_event_wrap.cc
parent75a461d0997e0a040c2194c5309c148f179563e9 (diff)
downloadandroid-node-v8-5fdff3854a4253681fb10aa626c8971e50834c10.tar.gz
android-node-v8-5fdff3854a4253681fb10aa626c8971e50834c10.tar.bz2
android-node-v8-5fdff3854a4253681fb10aa626c8971e50834c10.zip
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/fs_event_wrap.cc')
-rw-r--r--src/fs_event_wrap.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc
index 133acec070..b054b86a6c 100644
--- a/src/fs_event_wrap.cc
+++ b/src/fs_event_wrap.cc
@@ -74,7 +74,7 @@ FSEventWrap::FSEventWrap(Environment* env, Handle<Object> object)
FSEventWrap::~FSEventWrap() {
- assert(initialized_ == false);
+ CHECK_EQ(initialized_, false);
}
@@ -95,7 +95,7 @@ void FSEventWrap::Initialize(Handle<Object> target,
void FSEventWrap::New(const FunctionCallbackInfo<Value>& args) {
- assert(args.IsConstructCall());
+ CHECK(args.IsConstructCall());
Environment* env = Environment::GetCurrent(args.GetIsolate());
new FSEventWrap(env, args.This());
}
@@ -144,7 +144,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
HandleScope handle_scope(env->isolate());
Context::Scope context_scope(env->context());
- assert(wrap->persistent().IsEmpty() == false);
+ CHECK_EQ(wrap->persistent().IsEmpty(), false);
// We're in a bind here. libuv can set both UV_RENAME and UV_CHANGE but
// the Node API only lets us pass a single event to JS land.
@@ -165,7 +165,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
} else if (events & UV_CHANGE) {
event_string = env->change_string();
} else {
- assert(0 && "bad fs events flag");
+ CHECK(0 && "bad fs events flag");
abort();
}