Chromium Code Reviews| Index: third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py |
| diff --git a/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py b/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py |
| index 88bc277e1302386bd70ed7c93fab23e238f1586c..3a1804b52969b9ec21b7d382aa8ce34f2ae3a6f5 100755 |
| --- a/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py |
| +++ b/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py |
| @@ -269,7 +269,7 @@ class Method: |
| return self.return_type == "" |
| def generate_header(self, header_lines): |
| - param_list = ", ".join(map(Parameter.to_str_class, self.params)) |
| + param_list = ", ".join(map(Parameter.to_str_class_and_value, self.params)) |
| if self.is_scoped(): |
| member_list = "\n".join(map(generate_member_decl, self.params)) |
| header_lines.append(template_scoped_decl.substitute( |
| @@ -401,6 +401,11 @@ class Parameter: |
| def to_str_class_and_name(self): |
| return "%s %s" % (self.type, self.name) |
| + def to_str_class_and_value(self): |
| + if self.default_value: |
| + return "%s = %s" % (self.type, self.default_value) |
| + return self.to_str_class() |
|
alph
2017/03/07 00:22:20
self.type
|
| + |
| def to_str_class(self): |
| return self.type |