Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl |
| index 839d395a38a8ea022d6923cd95812b868721f5da..770282926e98a7636b98f71495962c87266505d7 100644 |
| --- a/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl |
| +++ b/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl |
| @@ -1,12 +1,17 @@ |
| {% import 'fields/base.tmpl' as base %} |
| -{% from 'fields/field.tmpl' import setter_expression %} |
| +{% from 'fields/field.tmpl' import getter_expression, setter_expression %} |
| {% macro decl_public_methods(field) %} |
| {{base.decl_initial_method(field)}} |
| {{base.decl_getter_method(field)}} |
| {{base.decl_setter_method(field)}} |
| void {{field.setter_method_name}}({{field.type_name}}&& v) { |
| - {{setter_expression(field)}} = std::move(v); |
| +{% if field.group_member_name %} |
| + if (!({{getter_expression(field)}} == v)) |
| + {{setter_expression(field)}} = std::move(v); |
| +{% else %} |
| + {{field.name}} = std::move({{value}}); |
|
alancutter (OOO until 2018)
2017/05/11 05:56:38
Should this be referencing v instead of {{value}}?
shend
2017/05/11 06:03:00
Oops, good catch.
|
| +{% endif %} |
| } |
| {{base.decl_resetter_method(field)}} |
| {% endmacro %} |