diff --git a/atom/common/native_mate_converters/net_converter.cc b/atom/common/native_mate_converters/net_converter.cc index e79e09df10..bc97f3a752 100644 --- a/atom/common/native_mate_converters/net_converter.cc +++ b/atom/common/native_mate_converters/net_converter.cc @@ -42,10 +42,7 @@ v8::Local Converter>::ToV8( std::string encoded_data; net::X509Certificate::GetPEMEncoded( val->os_cert_handle(), &encoded_data); - auto buffer = node::Buffer::Copy(isolate, - encoded_data.data(), - encoded_data.size()).ToLocalChecked(); - dict.Set("data", buffer); + dict.Set("data", encoded_data); dict.Set("issuerName", val->issuer().GetDisplayName()); dict.Set("subjectName", val->subject().GetDisplayName()); dict.Set("serialNumber", base::HexEncode(val->serial_number().data(),