refactor: convert crash reporter to gin (#17952)

This commit is contained in:
Jeremy Apthorp 2019-05-01 15:19:11 -07:00 committed by GitHub
parent 493af7f84c
commit 3949f0bd50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 174 additions and 72 deletions

View file

@ -10,7 +10,7 @@
#include "atom/common/native_mate_converters/string16_converter.h"
#include "base/files/file_path.h"
namespace mate {
namespace gin {
template <>
struct Converter<base::FilePath> {
@ -34,6 +34,24 @@ struct Converter<base::FilePath> {
}
};
} // namespace gin
namespace mate {
template <>
struct Converter<base::FilePath> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const base::FilePath& val) {
return gin::Converter<base::FilePath::StringType>::ToV8(isolate,
val.value());
}
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
base::FilePath* out) {
return gin::Converter<base::FilePath>::FromV8(isolate, val, out);
}
};
} // namespace mate
#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_FILE_PATH_CONVERTER_H_