diff --git a/native_mate/converter.h b/native_mate/converter.h index b0321c19a8..53e682a6b6 100644 --- a/native_mate/converter.h +++ b/native_mate/converter.h @@ -343,7 +343,7 @@ struct ToV8Traits { template bool TryConvertToV8(v8::Isolate* isolate, - T input, + const T& input, v8::Local* output) { return ToV8Traits::TryConvertToV8(isolate, input, output); } diff --git a/native_mate/dictionary.h b/native_mate/dictionary.h index 5a56a9e06b..9e80cb99ac 100644 --- a/native_mate/dictionary.h +++ b/native_mate/dictionary.h @@ -69,7 +69,7 @@ class Dictionary { } template - bool Set(const base::StringPiece& key, T val) { + bool Set(const base::StringPiece& key, const T& val) { v8::Local v8_value; if (!TryConvertToV8(isolate_, val, &v8_value)) return false;