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

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

Issue 618373003: [bindings] partial interfaces should not violate componentization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 class IdlInterface(object): 268 class IdlInterface(object):
269 def __init__(self, idl_name, node=None): 269 def __init__(self, idl_name, node=None):
270 self.attributes = [] 270 self.attributes = []
271 self.constants = [] 271 self.constants = []
272 self.constructors = [] 272 self.constructors = []
273 self.custom_constructors = [] 273 self.custom_constructors = []
274 self.extended_attributes = {} 274 self.extended_attributes = {}
275 self.operations = [] 275 self.operations = []
276 self.parent = None 276 self.parent = None
277 self.stringifier = None 277 self.stringifier = None
278 self.original_interface = None
bashi 2014/10/10 09:48:11 This looks strange to me.. My understanding is tha
tasak 2014/10/10 11:43:40 So interface_dependency_resolver updates idl defin
bashi 2014/10/15 05:29:22 That means we have two paths; the first path reads
tasak 2014/10/15 11:24:18 As far as I know, we can obtain valid IdlDefinitio
279 self.partial_interfaces = []
278 if not node: # Early exit for IdlException.__init__ 280 if not node: # Early exit for IdlException.__init__
279 return 281 return
280 282
281 self.is_callback = node.GetProperty('CALLBACK') or False 283 self.is_callback = node.GetProperty('CALLBACK') or False
282 self.is_exception = False 284 self.is_exception = False
283 # FIXME: uppercase 'Partial' => 'PARTIAL' in base IDL parser 285 # FIXME: uppercase 'Partial' => 'PARTIAL' in base IDL parser
284 self.is_partial = node.GetProperty('Partial') or False 286 self.is_partial = node.GetProperty('Partial') or False
285 self.idl_name = idl_name 287 self.idl_name = idl_name
286 self.name = node.GetName() 288 self.name = node.GetName()
287 289
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 child_class = child.GetClass() 817 child_class = child.GetClass()
816 if child_class != 'Type': 818 if child_class != 'Type':
817 raise ValueError('Unrecognized node class: %s' % child_class) 819 raise ValueError('Unrecognized node class: %s' % child_class)
818 return type_node_to_type(child) 820 return type_node_to_type(child)
819 821
820 822
821 def union_type_node_to_idl_union_type(node): 823 def union_type_node_to_idl_union_type(node):
822 member_types = [type_node_to_type(member_type_node) 824 member_types = [type_node_to_type(member_type_node)
823 for member_type_node in node.GetChildren()] 825 for member_type_node in node.GetChildren()]
824 return IdlUnionType(member_types) 826 return IdlUnionType(member_types)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698