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

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

Issue 1054443002: Make classes for union types exported. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/bindings/scripts/utilities.py » ('j') | Source/bindings/scripts/utilities.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 57c5b19714508159a751ec8872bcdaf1830a67bb..77f901c3b913775fdc0709b95b24a727a0612ade 100644
--- a/Source/bindings/scripts/code_generator_v8.py
+++ b/Source/bindings/scripts/code_generator_v8.py
@@ -333,9 +333,11 @@ class CodeGeneratorUnionType(object):
union_types, self.info_provider.interfaces_info)
template_context['code_generator'] = module_pyname
capitalized_component = self.target_component.capitalize()
+ template_context['exported'] = self.info_provider.specifier_for_export
template_context['header_filename'] = 'bindings/%s/v8/UnionTypes%s.h' % (
self.target_component, capitalized_component)
template_context['macro_guard'] = 'UnionType%s_h' % capitalized_component
+ additional_header_includes = [self.info_provider.include_path_for_export]
# Add UnionTypesCore.h as a dependency when we generate modules union types
# because we only generate union type containers which are used by both
@@ -343,9 +345,11 @@ class CodeGeneratorUnionType(object):
# FIXME: This is an ad hoc workaround and we need a general way to
# handle core <-> modules dependency.
if self.target_component == 'modules':
- template_context['header_includes'] = sorted(
- template_context['header_includes'] +
- ['bindings/core/v8/UnionTypesCore.h'])
+ additional_header_includes.append(
+ 'bindings/core/v8/UnionTypesCore.h')
+
+ template_context['header_includes'] = sorted(
+ template_context['header_includes'] + additional_header_includes)
header_text = header_template.render(template_context)
cpp_text = cpp_template.render(template_context)
« no previous file with comments | « no previous file | Source/bindings/scripts/utilities.py » ('j') | Source/bindings/scripts/utilities.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698