mirror of
https://github.com/electron/electron.git
synced 2026-02-17 02:21:37 -05:00
Avoid unnecessary copy in ConvertToV8
This commit is contained in:
@@ -189,10 +189,15 @@ struct Converter<std::vector<T> > {
|
||||
// Convenience functions that deduce T.
|
||||
template<typename T>
|
||||
v8::Handle<v8::Value> ConvertToV8(v8::Isolate* isolate,
|
||||
T input) {
|
||||
const T& input) {
|
||||
return Converter<T>::ToV8(isolate, input);
|
||||
}
|
||||
|
||||
inline v8::Handle<v8::Value> ConvertToV8(v8::Isolate* isolate,
|
||||
const char* input) {
|
||||
return Converter<const char*>::ToV8(isolate, input);
|
||||
}
|
||||
|
||||
inline v8::Handle<v8::String> StringToV8(
|
||||
v8::Isolate* isolate,
|
||||
const base::StringPiece& input) {
|
||||
|
||||
Reference in New Issue
Block a user