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

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

Issue 1961883002: Generate separate files for union type containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/compute_interfaces_info_individual.py
diff --git a/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py b/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py
index 26af9fe7d95e27b252ed5da3649fe1f0ab22a212..14e9767150a9b1fb25e2652c71145f279701da4f 100755
--- a/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py
+++ b/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py
@@ -266,9 +266,11 @@ class InterfaceInfoCollector(object):
partial_include_paths = []
if this_include_path:
partial_include_paths.append(this_include_path)
- if this_union_types:
+ for union_type in this_union_types:
+ if union_type.is_nullable:
+ union_type = union_type.inner_type
partial_include_paths.append(
- 'bindings/%s/v8/UnionTypes%s.h' % (component, component.capitalize()))
+ 'bindings/%s/v8/%s.h' % (component, union_type.name))
self.add_paths_to_partials_dict(definition.name, full_path, partial_include_paths)
# Collects C++ header paths which should be included from generated
# .cpp files. The resulting structure is as follows.
@@ -295,7 +297,7 @@ class InterfaceInfoCollector(object):
interface_info.update({
'extended_attributes': extended_attributes,
'full_path': full_path,
- 'has_union_types': bool(this_union_types),
+ 'union_types': this_union_types,
'implemented_as': implemented_as,
'implemented_by_interfaces': left_interfaces,
'implements_interfaces': right_interfaces,

Powered by Google App Engine
This is Rietveld 408576698