Don't pass callback as const reference
This commit is contained in:
Родитель
24d31e2046
Коммит
b41635e809
|
@ -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,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче