summaryrefslogtreecommitdiff
path: root/src/process_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/process_wrap.cc
parent75a461d0997e0a040c2194c5309c148f179563e9 (diff)
downloadnode-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/process_wrap.cc')
-rw-r--r--src/process_wrap.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc
index 42afea0f20..47baf90994 100644
--- a/src/process_wrap.cc
+++ b/src/process_wrap.cc
@@ -73,7 +73,7 @@ class ProcessWrap : public HandleWrap {
// This constructor should not be exposed to public javascript.
// Therefore we assert that we are not trying to call this as a
// normal function.
- assert(args.IsConstructCall());
+ CHECK(args.IsConstructCall());
Environment* env = Environment::GetCurrent(args.GetIsolate());
new ProcessWrap(env, args.This());
}
@@ -116,7 +116,7 @@ class ProcessWrap : public HandleWrap {
Local<String> handle_key = env->handle_string();
Local<Object> handle = stdio->Get(handle_key).As<Object>();
uv_stream_t* stream = HandleToStream(env, handle);
- assert(stream != NULL);
+ CHECK_NE(stream, NULL);
options->stdio[i].flags = UV_INHERIT_STREAM;
options->stdio[i].data.stream = stream;
@@ -231,7 +231,7 @@ class ProcessWrap : public HandleWrap {
int err = uv_spawn(env->event_loop(), &wrap->process_, &options);
if (err == 0) {
- assert(wrap->process_.data == wrap);
+ CHECK_EQ(wrap->process_.data, wrap);
wrap->object()->Set(env->pid_string(),
Integer::New(env->isolate(), wrap->process_.pid));
}
@@ -262,8 +262,8 @@ class ProcessWrap : public HandleWrap {
int64_t exit_status,
int term_signal) {
ProcessWrap* wrap = static_cast<ProcessWrap*>(handle->data);
- assert(wrap != NULL);
- assert(&wrap->process_ == handle);
+ CHECK_NE(wrap, NULL);
+ CHECK_EQ(&wrap->process_, handle);
Environment* env = wrap->env();
HandleScope handle_scope(env->isolate());