mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 13:14:48 +00:00
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:
parent
66cea39067
commit
e2d76278bf
5 changed files with 12 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue