Replace macros to check nullptr (#1674)

This replaces CHECK_EQ/CHECK_NE with CHECK_NULL/CHECK_NOT_NULL to check nullptr.
These macros are implemented in V8.
Refs: https://github.com/denoland/deno_third_party/blob/master/v8/src/base/logging.h#L312
This commit is contained in:
Masashi Hirano 2019-02-05 01:53:40 +09:00 committed by Ryan Dahl
parent 66cea39067
commit e2d76278bf
5 changed files with 12 additions and 12 deletions

View file

@ -155,7 +155,7 @@ void HandleException(v8::Local<v8::Context> context,
v8::Isolate* isolate = context->GetIsolate();
DenoIsolate* d = DenoIsolate::FromIsolate(isolate);
std::string json_str = EncodeExceptionAsJSON(context, exception);
CHECK(d != nullptr);
CHECK_NOT_NULL(d);
d->last_exception_ = json_str;
}
@ -164,7 +164,7 @@ void HandleExceptionMessage(v8::Local<v8::Context> context,
v8::Isolate* isolate = context->GetIsolate();
DenoIsolate* d = DenoIsolate::FromIsolate(isolate);
std::string json_str = EncodeMessageAsJSON(context, message);
CHECK(d != nullptr);
CHECK_NOT_NULL(d);
d->last_exception_ = json_str;
}