From e2d76278bfe8e51c2914bb126a5d98c59be2de3a Mon Sep 17 00:00:00 2001 From: Masashi Hirano Date: Tue, 5 Feb 2019 01:53:40 +0900 Subject: 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 --- libdeno/exceptions.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdeno/exceptions.cc') diff --git a/libdeno/exceptions.cc b/libdeno/exceptions.cc index 081e61060..0d7bbed8b 100644 --- a/libdeno/exceptions.cc +++ b/libdeno/exceptions.cc @@ -155,7 +155,7 @@ void HandleException(v8::Local 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 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; } -- cgit v1.2.3