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

Side by Side Diff: sky/engine/bindings/scripts/code_generator_v8.py

Issue 683593002: Remove GarbageCollected support from the bindings (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 for interface_name, interface_info in interfaces_info.iteritems() 117 for interface_name, interface_info in interfaces_info.iteritems()
118 if interface_info['is_callback_interface'])) 118 if interface_info['is_callback_interface']))
119 IdlType.set_dictionaries(set( 119 IdlType.set_dictionaries(set(
120 dictionary_name 120 dictionary_name
121 for dictionary_name, interface_info in interfaces_info.iteritems() 121 for dictionary_name, interface_info in interfaces_info.iteritems()
122 if interface_info['is_dictionary'])) 122 if interface_info['is_dictionary']))
123 IdlType.set_implemented_as_interfaces(dict( 123 IdlType.set_implemented_as_interfaces(dict(
124 (interface_name, interface_info['implemented_as']) 124 (interface_name, interface_info['implemented_as'])
125 for interface_name, interface_info in interfaces_info.iteritems() 125 for interface_name, interface_info in interfaces_info.iteritems()
126 if interface_info['implemented_as'])) 126 if interface_info['implemented_as']))
127 IdlType.set_garbage_collected_types(set(
128 interface_name
129 for interface_name, interface_info in interfaces_info.iteritems()
130 if 'GarbageCollected' in interface_info['inherited_extended_attribut es']))
131 IdlType.set_will_be_garbage_collected_types(set(
132 interface_name
133 for interface_name, interface_info in interfaces_info.iteritems()
134 if 'WillBeGarbageCollected' in interface_info['inherited_extended_at tributes']))
135 v8_types.set_component_dirs(dict( 127 v8_types.set_component_dirs(dict(
136 (interface_name, interface_info['component_dir']) 128 (interface_name, interface_info['component_dir'])
137 for interface_name, interface_info in interfaces_info.iteritems())) 129 for interface_name, interface_info in interfaces_info.iteritems()))
138 130
139 def generate_code(self, definitions, definition_name): 131 def generate_code(self, definitions, definition_name):
140 """Returns .h/.cpp code as ((path, content)...).""" 132 """Returns .h/.cpp code as ((path, content)...)."""
141 # Set local type info 133 # Set local type info
142 IdlType.set_callback_functions(definitions.callback_functions.keys()) 134 IdlType.set_callback_functions(definitions.callback_functions.keys())
143 IdlType.set_enums((enum.name, enum.values) 135 IdlType.set_enums((enum.name, enum.values)
144 for enum in definitions.enumerations.values()) 136 for enum in definitions.enumerations.values())
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 312
321 # Create a dummy file as output for the build system, 313 # Create a dummy file as output for the build system,
322 # since filenames of individual cache files are unpredictable and opaque 314 # since filenames of individual cache files are unpredictable and opaque
323 # (they are hashes of the template path, which varies based on environment) 315 # (they are hashes of the template path, which varies based on environment)
324 with open(dummy_filename, 'w') as dummy_file: 316 with open(dummy_filename, 'w') as dummy_file:
325 pass # |open| creates or touches the file 317 pass # |open| creates or touches the file
326 318
327 319
328 if __name__ == '__main__': 320 if __name__ == '__main__':
329 sys.exit(main(sys.argv)) 321 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698