Merge pull request #33 from nornagon/build-gn

Don't copy things in Dictionary::Set
This commit is contained in:
Cheng Zhao 2018-04-27 08:41:09 +09:00 committed by GitHub
commit 4cd7d11391
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -343,7 +343,7 @@ struct ToV8Traits<T, false> {
template <typename T>
bool TryConvertToV8(v8::Isolate* isolate,
T input,
const T& input,
v8::Local<v8::Value>* output) {
return ToV8Traits<T>::TryConvertToV8(isolate, input, output);
}

View file

@ -69,7 +69,7 @@ class Dictionary {
}
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;
if (!TryConvertToV8(isolate_, val, &v8_value))
return false;