Add back empty handle string

This commit is contained in:
Kevin Sawicki 2016-08-10 10:04:04 -07:00
parent 1dbaec0edd
commit 8155da152f

View file

@ -12,6 +12,8 @@ namespace mate {
namespace { namespace {
std::string V8TypeAsString(v8::Isolate* isolate, v8::Local<v8::Value> value) { std::string V8TypeAsString(v8::Isolate* isolate, v8::Local<v8::Value> value) {
if (value.IsEmpty())
return "<empty handle>";
v8::MaybeLocal<v8::String> details = value->ToDetailString(isolate); v8::MaybeLocal<v8::String> details = value->ToDetailString(isolate);
std::string result; std::string result;
if (!details.IsEmpty()) if (!details.IsEmpty())