Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: third_party/WebKit/Source/bindings/scripts/code_generator_v8.py

Issue 2837923003: Make NodeFilter a legacy callback interface. (Closed)
Patch Set: legacy_callback_interface.*.tmpl, etc. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698