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

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

Issue 1257613003: bindings: Supports inheritance of [Unforgeable] attributes as accessor-type properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Made inherit_unforgeable_attributes more robust. Created 5 years, 5 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 4169c23a2edca55f96e650d5aa4846aeb8229ea6..6d3a6c282faf4e81c714c8242afe6031912458bd 100644
--- a/Source/bindings/scripts/code_generator_v8.py
+++ b/Source/bindings/scripts/code_generator_v8.py
@@ -245,10 +245,9 @@ class CodeGeneratorV8(CodeGeneratorBase):
header_template_filename = 'interface.h'
cpp_template_filename = 'interface.cpp'
interface_context = v8_interface.interface_context
- header_template = self.jinja_env.get_template(header_template_filename)
- cpp_template = self.jinja_env.get_template(cpp_template_filename)
template_context = interface_context(interface)
+ includes.update(interface_info.get('cpp_includes', {}).get(component, set()))
if not interface.is_partial and not is_testing_target(full_path):
template_context['header_includes'].add(self.info_provider.include_path_for_export)
template_context['exported'] = self.info_provider.specifier_for_export
@@ -257,6 +256,9 @@ class CodeGeneratorV8(CodeGeneratorBase):
template_context['header_includes'].add('core/dom/DOMTypedArray.h')
elif interface_info['include_path']:
template_context['header_includes'].add(interface_info['include_path'])
+
+ header_template = self.jinja_env.get_template(header_template_filename)
+ cpp_template = self.jinja_env.get_template(cpp_template_filename)
header_text, cpp_text = render_template(
include_paths, header_template, cpp_template, template_context,
component)

Powered by Google App Engine
This is Rietveld 408576698