@@ -92,7 +92,7 @@ Worker::Worker(Environment* env,
92
92
93
93
CHECK_EQ (uv_loop_init (&loop_), 0 );
94
94
isolate_ = NewIsolate (array_buffer_allocator_.get (), &loop_);
95
- CHECK_NE (isolate_, nullptr );
95
+ CHECK_NOT_NULL (isolate_);
96
96
97
97
{
98
98
// Enter an environment capable of executing code in the child Isolate
@@ -115,7 +115,7 @@ Worker::Worker(Environment* env,
115
115
116
116
// TODO(addaleax): Use CreateEnvironment(), or generally another public API.
117
117
env_.reset (new Environment (isolate_data_.get (), context));
118
- CHECK_NE (env_, nullptr );
118
+ CHECK_NOT_NULL (env_);
119
119
env_->set_abort_on_uncaught_exception (false );
120
120
env_->set_worker_context (this );
121
121
thread_id_ = env_->thread_id ();
@@ -153,7 +153,7 @@ void Worker::Run() {
153
153
" __metadata" , " thread_name" , " name" ,
154
154
TRACE_STR_COPY (name.c_str ()));
155
155
MultiIsolatePlatform* platform = isolate_data_->platform ();
156
- CHECK_NE (platform, nullptr );
156
+ CHECK_NOT_NULL (platform);
157
157
158
158
Debug (this , " Starting worker with id %llu" , thread_id_);
159
159
{
@@ -339,7 +339,7 @@ void Worker::OnThreadStopped() {
339
339
CHECK (stopped_);
340
340
}
341
341
342
- CHECK_EQ (child_port_, nullptr );
342
+ CHECK_NULL (child_port_);
343
343
parent_port_ = nullptr ;
344
344
}
345
345
@@ -369,7 +369,7 @@ Worker::~Worker() {
369
369
370
370
CHECK (stopped_);
371
371
CHECK (thread_joined_);
372
- CHECK_EQ (child_port_, nullptr );
372
+ CHECK_NULL (child_port_);
373
373
374
374
// This has most likely already happened within the worker thread -- this
375
375
// is just in case Worker creation failed early.
@@ -509,7 +509,7 @@ void Worker::Exit(int code) {
509
509
Debug (this , " Worker %llu called Exit(%d)" , thread_id_, code);
510
510
511
511
if (!stopped_) {
512
- CHECK_NE (env_, nullptr );
512
+ CHECK_NOT_NULL (env_);
513
513
stopped_ = true ;
514
514
exit_code_ = code;
515
515
if (child_port_ != nullptr )
0 commit comments