refactor: convert crash reporter to gin (#17952)
This commit is contained in:
parent
493af7f84c
commit
3949f0bd50
10 changed files with 174 additions and 72 deletions
|
@ -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_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue