Merge pull request #27 from electron/fix-to-details-string-call

Fix Value::ToDetailString() call
This commit is contained in:
Charles Kerr 2018-04-13 11:19:17 -05:00 committed by GitHub
commit 3edb1eed8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,8 @@ namespace {
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->GetCurrentContext());
std::string result;
if (!details.IsEmpty())
ConvertFromV8(isolate, details.ToLocalChecked(), &result);