Don't copy things on Dictionary::Set
This commit is contained in:
parent
99d9e262eb
commit
7733b87431
2 changed files with 2 additions and 2 deletions
|
@ -343,7 +343,7 @@ struct ToV8Traits<T, false> {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool TryConvertToV8(v8::Isolate* isolate,
|
bool TryConvertToV8(v8::Isolate* isolate,
|
||||||
T input,
|
const T& input,
|
||||||
v8::Local<v8::Value>* output) {
|
v8::Local<v8::Value>* output) {
|
||||||
return ToV8Traits<T>::TryConvertToV8(isolate, input, output);
|
return ToV8Traits<T>::TryConvertToV8(isolate, input, output);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ class Dictionary {
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool Set(const base::StringPiece& key, T val) {
|
bool Set(const base::StringPiece& key, const T& val) {
|
||||||
v8::Local<v8::Value> v8_value;
|
v8::Local<v8::Value> v8_value;
|
||||||
if (!TryConvertToV8(isolate_, val, &v8_value))
|
if (!TryConvertToV8(isolate_, val, &v8_value))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue