Chromium Code Reviews| 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 eb5a2363475486795225f10ce39ec9eb9620414c..8de510438158f4ba856622428496f3ec10fdd1b8 100755 |
| --- a/Source/bindings/scripts/compute_interfaces_info_individual.py |
| +++ b/Source/bindings/scripts/compute_interfaces_info_individual.py |
| @@ -197,8 +197,8 @@ class InterfaceInfoCollector(object): |
| else: |
| raise Exception('IDL file must contain one interface or dictionary') |
| - self.union_types.update( |
| - collect_union_types_from_definitions(definitions)) |
| + this_union_types = collect_union_types_from_definitions(definitions) |
| + self.union_types.update(this_union_types) |
| extended_attributes = definition.extended_attributes |
| implemented_as = extended_attributes.get('ImplementedAs') |
| @@ -220,6 +220,7 @@ class InterfaceInfoCollector(object): |
| interface_info.update({ |
| 'extended_attributes': extended_attributes, |
| 'full_path': full_path, |
| + 'has_union_types': len(this_union_types) > 0, # explicit len(...) > 0 to convert boolean |
|
Jens Widell
2014/10/28 11:31:37
Another way of explicitly converting to bool would
bashi
2014/10/29 01:34:32
Definitely better way:) Done.
|
| 'implemented_as': implemented_as, |
| 'implemented_by_interfaces': left_interfaces, |
| 'implements_interfaces': right_interfaces, |