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

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

Issue 680193003: IDL: Generate union type containers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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: Source/bindings/scripts/code_generator_v8.py
diff --git a/Source/bindings/scripts/code_generator_v8.py b/Source/bindings/scripts/code_generator_v8.py
index 10ceed630ad1ece6e5079ca4b306b7e7b986abee..6462ba304efe2bf5814a2b06882762e7b22247b5 100644
--- a/Source/bindings/scripts/code_generator_v8.py
+++ b/Source/bindings/scripts/code_generator_v8.py
@@ -266,9 +266,12 @@ class CodeGeneratorUnionTypeContainers(object):
header_template = self.jinja_env.get_template('union.h')
cpp_template = self.jinja_env.get_template('union.cpp')
template_context = v8_union.union_context(
- sorted(union_types, key=lambda union_type: union_type.name))
+ sorted(union_types, key=lambda union_type: union_type.name),
+ self.interfaces_info)
template_context['code_generator'] = module_pyname
capitalized_component = self.target_component.capitalize()
+ template_context['header_filename'] = 'bindings/%s/v8/UnionTypes%s.h' % (
+ self.target_component, capitalized_component)
template_context['macro_guard'] = 'UnionType%s_h' % capitalized_component
header_text = header_template.render(template_context)
cpp_text = cpp_template.render(template_context)

Powered by Google App Engine
This is Rietveld 408576698