| Index: third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
|
| diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
|
| index f09fc2b5068ceb312eab707f67a312ea849c6d08..4ea422e216ee43446995951f3061123c37af8fdb 100644
|
| --- a/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
|
| +++ b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
|
| @@ -63,6 +63,14 @@ unsigned {{field.name}} : {{field.size}}; // {{field.type_name}}
|
| {%- endif %}
|
| {% endmacro %}
|
|
|
| +{% macro compare(is_pointer_type, expr, other_name) %}
|
| +{% if is_pointer_type -%}
|
| + DataEquivalent({{expr}}, {{other_name}}.{{expr}})
|
| +{%- else -%}
|
| + {{expr}} == {{other_name}}.{{expr}}
|
| +{%- endif %}
|
| +{% endmacro %}
|
| +
|
| {# Given a group and a list of fields to compare, this generates a set of
|
| equality comparisons on those fields. The generated comparisons take
|
| advantage of group sharing. #}
|
| @@ -79,7 +87,7 @@ unsigned {{field.name}} : {{field.size}}; // {{field.type_name}}
|
| {% endif %}
|
| {% endfor %}
|
| {% for field in group.fields|select("in", fields_to_compare) -%}
|
| - {{getter_expression(field)}} == o.{{getter_expression(field)}} &&
|
| + {{compare(field.pointer_type_name, getter_expression(field), "o")}} &&
|
| {% endfor %}
|
| {% endmacro %}
|
|
|
| @@ -123,4 +131,4 @@ if ({{group.group_name}}.Get() != other.{{group.group_name}}.Get()) {
|
| if (self.{{expression}} != other.{{expression}})
|
| return true;
|
| {% endfor %}
|
| -{% endmacro %}
|
| +{% endmacro %}
|
|
|