Commit 436dd7a4 authored by jl@opera.com's avatar jl@opera.com

IDL: Fix union type support in cross-component partial interfaces

If a partial interface in modules extends an interface in core and uses
any union types, the generated bindings/modules/v8/V8*Partial.cpp file
needs to include UnionTypesModules.h. This did not happen, since use of
union types was only tracked per main (non-partial) interface.

BUG=240176

Review URL: https://codereview.chromium.org/684653009

git-svn-id: svn://svn.chromium.org/blink/trunk@185136 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a1b464db
...@@ -168,11 +168,10 @@ class InterfaceInfoCollector(object): ...@@ -168,11 +168,10 @@ class InterfaceInfoCollector(object):
self.union_types = set() self.union_types = set()
def add_paths_to_partials_dict(self, partial_interface_name, full_path, def add_paths_to_partials_dict(self, partial_interface_name, full_path,
this_include_path=None): include_paths):
paths_dict = self.partial_interface_files[partial_interface_name] paths_dict = self.partial_interface_files[partial_interface_name]
paths_dict['full_paths'].append(full_path) paths_dict['full_paths'].append(full_path)
if this_include_path: paths_dict['include_paths'].extend(include_paths)
paths_dict['include_paths'].append(this_include_path)
def collect_info(self, idl_filename): def collect_info(self, idl_filename):
"""Reads an idl file and collects information which is required by the """Reads an idl file and collects information which is required by the
...@@ -212,7 +211,14 @@ class InterfaceInfoCollector(object): ...@@ -212,7 +211,14 @@ class InterfaceInfoCollector(object):
if definition.is_partial: if definition.is_partial:
# We don't create interface_info for partial interfaces, but # We don't create interface_info for partial interfaces, but
# adds paths to another dict. # adds paths to another dict.
self.add_paths_to_partials_dict(definition.name, full_path, this_include_path) partial_include_paths = []
if this_include_path:
partial_include_paths.append(this_include_path)
if this_union_types:
component = idl_filename_to_component(idl_filename)
partial_include_paths.append(
'bindings/%s/v8/UnionTypes%s.h' % (component, component.capitalize()))
self.add_paths_to_partials_dict(definition.name, full_path, partial_include_paths)
return return
# 'implements' statements can be included in either the file for the # 'implements' statements can be included in either the file for the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment