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

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

Issue 735983002: IDL: Defer typedef resolution (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « Source/bindings/scripts/code_generator_v8.py ('k') | Source/bindings/scripts/idl_compiler.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/compute_interfaces_info_individual.py
diff --git a/Source/bindings/scripts/compute_interfaces_info_individual.py b/Source/bindings/scripts/compute_interfaces_info_individual.py
index 7d9f77fdc280b3edef6ec0d0bd2cd3cadae12cd3..9876b028a180389f04f3e2d1a90aa096d0bd333e 100755
--- a/Source/bindings/scripts/compute_interfaces_info_individual.py
+++ b/Source/bindings/scripts/compute_interfaces_info_individual.py
@@ -153,6 +153,9 @@ def collect_union_types_from_definitions(definitions):
this_union_types.add(callback_function.idl_type)
for dictionary in definitions.dictionaries.itervalues():
this_union_types.update(union_types_from(dictionary.members))
+ for idl_type in definitions.typedefs.itervalues():
+ if idl_type.is_union_type:
+ this_union_types.add(idl_type)
return this_union_types
@@ -166,6 +169,7 @@ class InterfaceInfoCollector(object):
'include_paths': [],
})
self.union_types = set()
+ self.typedefs = {}
def add_paths_to_partials_dict(self, partial_interface_name, full_path,
include_paths):
@@ -204,6 +208,8 @@ class InterfaceInfoCollector(object):
this_union_types = collect_union_types_from_definitions(definitions)
self.union_types.update(this_union_types)
+ self.typedefs.update(definitions.typedefs)
+
extended_attributes = definition.extended_attributes
implemented_as = extended_attributes.get('ImplementedAs')
full_path = os.path.realpath(idl_filename)
@@ -256,6 +262,7 @@ class InterfaceInfoCollector(object):
def get_component_info_as_dict(self):
"""Returns component wide information as a dict."""
return {
+ 'typedefs': self.typedefs,
'union_types': self.union_types,
}
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.py ('k') | Source/bindings/scripts/idl_compiler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698