From 5fdff3854a4253681fb10aa626c8971e50834c10 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 11 Oct 2014 16:52:07 +0200 Subject: 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 --- src/fs_event_wrap.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fs_event_wrap.cc') 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) FSEventWrap::~FSEventWrap() { - assert(initialized_ == false); + CHECK_EQ(initialized_, false); } @@ -95,7 +95,7 @@ void FSEventWrap::Initialize(Handle target, void FSEventWrap::New(const FunctionCallbackInfo& 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(); } -- cgit v1.2.1