summaryrefslogtreecommitdiff
path: root/libdeno/exceptions.cc
diff options
context:
space:
mode:
authorMasashi Hirano <shisama07@gmail.com>2019-02-05 01:53:40 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-02-04 11:53:40 -0500
commite2d76278bfe8e51c2914bb126a5d98c59be2de3a (patch)
tree2684e1fcff637152094c46fe9e3906fd38229dc1 /libdeno/exceptions.cc
parent66cea3906733955c6c1fb223d0bf42eb6bc456b4 (diff)
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
Diffstat (limited to 'libdeno/exceptions.cc')
-rw-r--r--libdeno/exceptions.cc4
1 files changed, 2 insertions, 2 deletions
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<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;
}