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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 import cPickle as pickle 85 import cPickle as pickle
86 import optparse 86 import optparse
87 import sys 87 import sys
88 88
89 from utilities import idl_filename_to_component, read_pickle_files, write_pickle _file, merge_dict_recursively 89 from utilities import idl_filename_to_component, read_pickle_files, write_pickle _file, merge_dict_recursively
90 90
91 INHERITED_EXTENDED_ATTRIBUTES = set([ 91 INHERITED_EXTENDED_ATTRIBUTES = set([
92 'ActiveDOMObject', 92 'ActiveDOMObject',
93 'DependentLifetime', 93 'DependentLifetime',
94 'GarbageCollected', 94 'GarbageCollected',
95 'WillBeGarbageCollected', 95 'GarbageCollected',
sof 2016/02/09 15:45:45 Duplicate.
96 ]) 96 ])
97 97
98 # Main variable (filled in and exported) 98 # Main variable (filled in and exported)
99 interfaces_info = {} 99 interfaces_info = {}
100 100
101 # Auxiliary variables (not visible to future build steps) 101 # Auxiliary variables (not visible to future build steps)
102 partial_interface_files = defaultdict(lambda: { 102 partial_interface_files = defaultdict(lambda: {
103 'full_paths': [], 103 'full_paths': [],
104 'include_paths': [], 104 'include_paths': [],
105 }) 105 })
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if interface_info['ancestors']: 179 if interface_info['ancestors']:
180 ancestors[interface_name] = interface_info['ancestors'] 180 ancestors[interface_name] = interface_info['ancestors']
181 if interface_info['is_callback_interface']: 181 if interface_info['is_callback_interface']:
182 callback_interfaces.add(interface_name) 182 callback_interfaces.add(interface_name)
183 if interface_info['is_dictionary']: 183 if interface_info['is_dictionary']:
184 dictionaries[interface_name] = interface_info['is_dictionary'] 184 dictionaries[interface_name] = interface_info['is_dictionary']
185 if interface_info['implemented_as']: 185 if interface_info['implemented_as']:
186 implemented_as_interfaces[interface_name] = interface_info['implemen ted_as'] 186 implemented_as_interfaces[interface_name] = interface_info['implemen ted_as']
187 187
188 inherited_extended_attributes = interface_info['inherited_extended_attri butes'] 188 inherited_extended_attributes = interface_info['inherited_extended_attri butes']
189 if 'WillBeGarbageCollected' in inherited_extended_attributes: 189 if 'GarbageCollected' in inherited_extended_attributes:
sof 2016/02/09 15:45:45 will_be_garbage_* no longer needed, right?
190 will_be_garbage_collected_interfaces.add(interface_name) 190 will_be_garbage_collected_interfaces.add(interface_name)
191 if 'GarbageCollected' in inherited_extended_attributes: 191 if 'GarbageCollected' in inherited_extended_attributes:
192 garbage_collected_interfaces.add(interface_name) 192 garbage_collected_interfaces.add(interface_name)
193 193
194 interfaces_info['ancestors'] = ancestors 194 interfaces_info['ancestors'] = ancestors
195 interfaces_info['callback_interfaces'] = callback_interfaces 195 interfaces_info['callback_interfaces'] = callback_interfaces
196 interfaces_info['dictionaries'] = dictionaries 196 interfaces_info['dictionaries'] = dictionaries
197 interfaces_info['implemented_as_interfaces'] = implemented_as_interfaces 197 interfaces_info['implemented_as_interfaces'] = implemented_as_interfaces
198 interfaces_info['garbage_collected_interfaces'] = garbage_collected_interfac es 198 interfaces_info['garbage_collected_interfaces'] = garbage_collected_interfac es
199 interfaces_info['will_be_garbage_collected_interfaces'] = will_be_garbage_co llected_interfaces 199 interfaces_info['will_be_garbage_collected_interfaces'] = will_be_garbage_co llected_interfaces
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 info_individuals = read_pickle_files(args) 327 info_individuals = read_pickle_files(args)
328 328
329 compute_interfaces_info_overall(info_individuals) 329 compute_interfaces_info_overall(info_individuals)
330 write_pickle_file(interfaces_info_filename, 330 write_pickle_file(interfaces_info_filename,
331 interfaces_info, 331 interfaces_info,
332 options.write_file_only_if_changed) 332 options.write_file_only_if_changed)
333 333
334 334
335 if __name__ == '__main__': 335 if __name__ == '__main__':
336 sys.exit(main()) 336 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698