Index: third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template |
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template b/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template |
index 553ba55f7c0de6956c1d0bf5900149a1a6c814b5..25b90ed88ec2cc3a9b4738a97aff108524d0adca 100644 |
--- a/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template |
+++ b/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template |
@@ -89,9 +89,9 @@ public: |
{% if property.optional %} |
bool has{{property.name | to_title_case}}() { return m_{{property.name}}.isJust(); } |
- {{resolve_type(property).raw_return_type}} get{{property.name | to_title_case}}({{resolve_type(property).raw_pass_type}} defaultValue) { return m_{{property.name}}.isJust() ? m_{{property.name}}.fromJust() : defaultValue; } |
+ {{resolve_type(property).raw_return_type}} get{{property.name | to_title_case}}({{resolve_type(property).raw_pass_type}} defaultValue) const { return m_{{property.name}}.isJust() ? m_{{property.name}}.fromJust() : defaultValue; } |
{% else %} |
- {{resolve_type(property).raw_return_type}} get{{property.name | to_title_case}}() { return {{resolve_type(property).to_raw_type % ("m_" + property.name)}}; } |
+ const {{resolve_type(property).return_type}}& get{{property.name | to_title_case}}() const { return {{"m_" + property.name}}; } |
dgozman
2016/10/12 21:00:40
Could you please describe why this change is neede
alex clarke (OOO till 29th)
2016/10/13 20:25:10
Before my change it returned the object by value i
dgozman
2016/10/14 01:32:33
- Note that Strings are cheap in blink - they are
|
{% endif %} |
void set{{property.name | to_title_case}}({{resolve_type(property).pass_type}} value) { m_{{property.name}} = {{resolve_type(property).to_rvalue % "value"}}; } |
{% endfor %} |