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

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

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed LICENSE and windows build Created 6 years, 5 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 # coding=utf-8 2 # coding=utf-8
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 custom_constructors = [{ # Only needed for computing interface length 190 custom_constructors = [{ # Only needed for computing interface length
191 'number_of_required_arguments': 191 'number_of_required_arguments':
192 number_of_required_arguments(constructor), 192 number_of_required_arguments(constructor),
193 } for constructor in interface.custom_constructors] 193 } for constructor in interface.custom_constructors]
194 194
195 # [EventConstructor] 195 # [EventConstructor]
196 has_event_constructor = 'EventConstructor' in extended_attributes 196 has_event_constructor = 'EventConstructor' in extended_attributes
197 any_type_attributes = [attribute for attribute in interface.attributes 197 any_type_attributes = [attribute for attribute in interface.attributes
198 if attribute.idl_type.name == 'Any'] 198 if attribute.idl_type.name == 'Any']
199 if has_event_constructor: 199 if has_event_constructor:
200 includes.add('bindings/core/v8/Dictionary.h') 200 includes.add('bindings/core/v8/Dictionary.h')
Nils Barth (inactive) 2014/07/09 13:20:37 set.update, so: includes.update(['bindings/core/v8
tasak 2014/07/10 04:52:08 Done.
201 includes.add('bindings/core/v8/DictionaryHelper.h')
201 if any_type_attributes: 202 if any_type_attributes:
202 includes.add('bindings/core/v8/SerializedScriptValue.h') 203 includes.add('bindings/core/v8/SerializedScriptValue.h')
203 204
204 # [NamedConstructor] 205 # [NamedConstructor]
205 named_constructor = named_constructor_context(interface) 206 named_constructor = named_constructor_context(interface)
206 207
207 if (constructors or custom_constructors or has_event_constructor or 208 if (constructors or custom_constructors or has_event_constructor or
208 named_constructor): 209 named_constructor):
209 includes.add('bindings/core/v8/V8ObjectConstructor.h') 210 includes.add('bindings/core/v8/V8ObjectConstructor.h')
210 includes.add('core/frame/LocalDOMWindow.h') 211 includes.add('core/frame/LocalDOMWindow.h')
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 deleter = next( 1101 deleter = next(
1101 method 1102 method
1102 for method in interface.operations 1103 for method in interface.operations
1103 if ('deleter' in method.specials and 1104 if ('deleter' in method.specials and
1104 len(method.arguments) == 1 and 1105 len(method.arguments) == 1 and
1105 str(method.arguments[0].idl_type) == 'DOMString')) 1106 str(method.arguments[0].idl_type) == 'DOMString'))
1106 except StopIteration: 1107 except StopIteration:
1107 return None 1108 return None
1108 1109
1109 return property_deleter(deleter) 1110 return property_deleter(deleter)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698