|
@@ -10,13 +10,21 @@
|
|
|
|
|
|
namespace gin {
|
|
|
|
|
|
+template <>
|
|
|
+struct Converter<base::ValueView> {
|
|
|
+ static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
|
|
+ const base::ValueView val);
|
|
|
+};
|
|
|
+
|
|
|
template <>
|
|
|
struct Converter<base::Value::Dict> {
|
|
|
static bool FromV8(v8::Isolate* isolate,
|
|
|
v8::Local<v8::Value> val,
|
|
|
base::Value::Dict* out);
|
|
|
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
|
|
- const base::Value::Dict& val);
|
|
|
+ const base::Value::Dict& val) {
|
|
|
+ return gin::ConvertToV8(isolate, base::ValueView{val});
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
template <>
|
|
@@ -25,7 +33,9 @@ struct Converter<base::Value> {
|
|
|
v8::Local<v8::Value> val,
|
|
|
base::Value* out);
|
|
|
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
|
|
- const base::Value& val);
|
|
|
+ const base::Value& val) {
|
|
|
+ return gin::ConvertToV8(isolate, base::ValueView{val});
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
template <>
|
|
@@ -34,7 +44,9 @@ struct Converter<base::Value::List> {
|
|
|
v8::Local<v8::Value> val,
|
|
|
base::Value::List* out);
|
|
|
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
|
|
- const base::Value::List& val);
|
|
|
+ const base::Value::List& val) {
|
|
|
+ return gin::ConvertToV8(isolate, base::ValueView{val});
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
} // namespace gin
|