Don't pass callback as const reference

This commit is contained in:
Cheng Zhao 2015-08-13 12:06:35 +08:00
Родитель 24d31e2046
Коммит b41635e809
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -90,7 +90,7 @@ class ObjectTemplateBuilder {
// for creating raw function templates. // for creating raw function templates.
template<typename T> template<typename T>
ObjectTemplateBuilder& SetMethod(const base::StringPiece& name, ObjectTemplateBuilder& SetMethod(const base::StringPiece& name,
const T& callback, T callback,
bool safe_after_destroyed = false) { bool safe_after_destroyed = false) {
return SetImpl(name, return SetImpl(name,
CallbackTraits<T>::CreateTemplate(isolate_, CallbackTraits<T>::CreateTemplate(isolate_,
@ -99,7 +99,7 @@ class ObjectTemplateBuilder {
} }
template<typename T> template<typename T>
ObjectTemplateBuilder& SetProperty(const base::StringPiece& name, ObjectTemplateBuilder& SetProperty(const base::StringPiece& name,
const T& getter, T getter,
bool safe_after_destroyed = false) { bool safe_after_destroyed = false) {
return SetPropertyImpl( return SetPropertyImpl(
name, name,
@ -109,8 +109,8 @@ class ObjectTemplateBuilder {
} }
template<typename T, typename U> template<typename T, typename U>
ObjectTemplateBuilder& SetProperty(const base::StringPiece& name, ObjectTemplateBuilder& SetProperty(const base::StringPiece& name,
const T& getter, T getter,
const U& setter, U setter,
bool safe_after_destroyed = false) { bool safe_after_destroyed = false) {
return SetPropertyImpl( return SetPropertyImpl(
name, name,