Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/scripts/code_generator_v8.py |
| diff --git a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py |
| index 9c44520231c0d4613846461908a67855d20126ae..ee4ffe71e5f6bbfdee5a0aa090c37159df240792 100644 |
| --- a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py |
| +++ b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py |
| @@ -181,7 +181,11 @@ class CodeGeneratorV8(CodeGeneratorV8Base): |
| include_paths = interface_info.get('dependencies_include_paths') |
| # Select appropriate Jinja template and contents function |
| - if interface.is_callback: |
| + if interface.is_callback and len(interface.constants) > 0: |
|
bashi
2017/04/28 06:28:34
Could you add a comment why we use len(interface.c
tkent
2017/04/28 09:22:01
Done.
|
| + header_template_filename = 'legacy_callback_interface.h.tmpl' |
| + cpp_template_filename = 'legacy_callback_interface.cpp.tmpl' |
| + interface_context = v8_callback_interface.legacy_callback_interface_context |
| + elif interface.is_callback: |
| header_template_filename = 'callback_interface.h.tmpl' |
| cpp_template_filename = 'callback_interface.cpp.tmpl' |
| interface_context = v8_callback_interface.callback_interface_context |