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

Side by Side Diff: Source/bindings/scripts/interface_dependency_resolver.py

Issue 1057443002: Partial interface should use original interface's cpp_name. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another fix Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 # - A partial interface defined in core cannot update 178 # - A partial interface defined in core cannot update
179 # the original interface defined in modules. 179 # the original interface defined in modules.
180 if not is_valid_component_dependency(dependency_component, component ): 180 if not is_valid_component_dependency(dependency_component, component ):
181 raise Exception('The partial interface:%s in %s cannot update ' 181 raise Exception('The partial interface:%s in %s cannot update '
182 'the original interface:%s in %s' % (dependency_ interface.name, 182 'the original interface:%s in %s' % (dependency_ interface.name,
183 dependency_ component, 183 dependency_ component,
184 target_inte rface.name, 184 target_inte rface.name,
185 component)) 185 component))
186 186
187 if dependency_component in resolved_definitions: 187 if dependency_component in resolved_definitions:
188 dependency_interface.extended_attributes.pop('ImplementedAs', No ne)
bashi 2015/04/02 23:15:27 Without having comment, it's difficult to understa
tasak 2015/04/03 05:22:53 Done.
188 resolved_definitions[dependency_component].update(dependency_def initions) 189 resolved_definitions[dependency_component].update(dependency_def initions)
189 continue 190 continue
190 191
191 dependency_interface.extended_attributes.update(target_interface.ext ended_attributes) 192 dependency_interface.extended_attributes.update(target_interface.ext ended_attributes)
192 assert target_interface == definitions.interfaces[dependency_interfa ce.name] 193 assert target_interface == definitions.interfaces[dependency_interfa ce.name]
194 if 'ImplementedAs' not in target_interface.extended_attributes:
195 dependency_interface.extended_attributes.pop('ImplementedAs', No ne)
193 dependency_interface.original_interface = target_interface 196 dependency_interface.original_interface = target_interface
194 target_interface.partial_interfaces.append(dependency_interface) 197 target_interface.partial_interfaces.append(dependency_interface)
195 resolved_definitions[dependency_component] = dependency_definitions 198 resolved_definitions[dependency_component] = dependency_definitions
196 else: 199 else:
197 # Case: target_interface implements dependency_interface. 200 # Case: target_interface implements dependency_interface.
198 # So, 201 # So,
199 # - An interface defined in modules can implement some interface 202 # - An interface defined in modules can implement some interface
200 # defined in core. 203 # defined in core.
201 # In this case, we need "NoInterfaceObject" extended attribute. 204 # In this case, we need "NoInterfaceObject" extended attribute.
202 # However, 205 # However,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 for key, value in extras.items(): 282 for key, value in extras.items():
280 if key not in attributes: 283 if key not in attributes:
281 attributes[key] = value 284 attributes[key] = value
282 285
283 for attribute in dependency_interface.attributes: 286 for attribute in dependency_interface.attributes:
284 update_attributes(attribute.extended_attributes, merged_extended_attribu tes) 287 update_attributes(attribute.extended_attributes, merged_extended_attribu tes)
285 for constant in dependency_interface.constants: 288 for constant in dependency_interface.constants:
286 update_attributes(constant.extended_attributes, merged_extended_attribut es) 289 update_attributes(constant.extended_attributes, merged_extended_attribut es)
287 for operation in dependency_interface.operations: 290 for operation in dependency_interface.operations:
288 update_attributes(operation.extended_attributes, merged_extended_attribu tes) 291 update_attributes(operation.extended_attributes, merged_extended_attribu tes)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698