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

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py

Issue 2408083003: Drop [ExperimentalCallbackFunction] (Closed)
Patch Set: Update tests and expectations Created 4 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (C) 2013 Google Inc. All rights reserved. 3 # Copyright (C) 2013 Google Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 interface_info['unforgeable_attributes'] = {} 213 interface_info['unforgeable_attributes'] = {}
214 interface_info['unforgeable_attributes'][component] = unforgeable_at tributes 214 interface_info['unforgeable_attributes'][component] = unforgeable_at tributes
215 return interface_info 215 return interface_info
216 216
217 definitions = self.reader.read_idl_file(idl_filename) 217 definitions = self.reader.read_idl_file(idl_filename)
218 218
219 this_union_types = collect_union_types_from_definitions(definitions) 219 this_union_types = collect_union_types_from_definitions(definitions)
220 self.union_types.update(this_union_types) 220 self.union_types.update(this_union_types)
221 self.typedefs.update(definitions.typedefs) 221 self.typedefs.update(definitions.typedefs)
222 for callback_function_name, callback_function in definitions.callback_fu nctions.iteritems(): 222 for callback_function_name, callback_function in definitions.callback_fu nctions.iteritems():
223 if 'ExperimentalCallbackFunction' in callback_function.extended_attr ibutes: 223 # Set 'component_dir' to specify a directory that callback function files belong to
224 # Set 'component_dir' to specify a directory that callback funct ion files belong to 224 self.callback_functions[callback_function_name] = {
225 self.callback_functions[callback_function_name] = { 225 'callback_function': callback_function,
226 'callback_function': callback_function, 226 'component_dir': idl_filename_to_component(idl_filename),
227 'component_dir': idl_filename_to_component(idl_filename), 227 'full_path': os.path.realpath(idl_filename),
228 'full_path': os.path.realpath(idl_filename), 228 }
229 }
230 # Check enum duplication. 229 # Check enum duplication.
231 for enum_name in definitions.enumerations.keys(): 230 for enum_name in definitions.enumerations.keys():
232 for defined_enum in self.enumerations: 231 for defined_enum in self.enumerations:
233 if defined_enum.name == enum_name: 232 if defined_enum.name == enum_name:
234 raise Exception('Enumeration %s has multiple definitions' % enum_name) 233 raise Exception('Enumeration %s has multiple definitions' % enum_name)
235 self.enumerations.update(definitions.enumerations.values()) 234 self.enumerations.update(definitions.enumerations.values())
236 235
237 if definitions.interfaces: 236 if definitions.interfaces:
238 definition = next(definitions.interfaces.itervalues()) 237 definition = next(definitions.interfaces.itervalues())
239 interface_info = { 238 interface_info = {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 for idl_filename in idl_files: 354 for idl_filename in idl_files:
356 info_collector.collect_info(idl_filename) 355 info_collector.collect_info(idl_filename)
357 356
358 write_pickle_file(options.interfaces_info_file, 357 write_pickle_file(options.interfaces_info_file,
359 info_collector.get_info_as_dict()) 358 info_collector.get_info_as_dict())
360 write_pickle_file(options.component_info_file, 359 write_pickle_file(options.component_info_file,
361 info_collector.get_component_info_as_dict()) 360 info_collector.get_component_info_as_dict())
362 361
363 if __name__ == '__main__': 362 if __name__ == '__main__':
364 sys.exit(main()) 363 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698