OLD | NEW |
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } for constructor in interface.custom_constructors] | 242 } for constructor in interface.custom_constructors] |
243 | 243 |
244 # [EventConstructor] | 244 # [EventConstructor] |
245 has_event_constructor = 'EventConstructor' in extended_attributes | 245 has_event_constructor = 'EventConstructor' in extended_attributes |
246 any_type_attributes = [attribute for attribute in interface.attributes | 246 any_type_attributes = [attribute for attribute in interface.attributes |
247 if attribute.idl_type.name == 'Any'] | 247 if attribute.idl_type.name == 'Any'] |
248 if has_event_constructor: | 248 if has_event_constructor: |
249 includes.add('bindings/core/v8/Dictionary.h') | 249 includes.add('bindings/core/v8/Dictionary.h') |
250 if any_type_attributes: | 250 if any_type_attributes: |
251 includes.add('bindings/core/v8/SerializedScriptValue.h') | 251 includes.add('bindings/core/v8/SerializedScriptValue.h') |
| 252 includes.add('bindings/core/v8/SerializedScriptValueFactory.h') |
252 | 253 |
253 # [NamedConstructor] | 254 # [NamedConstructor] |
254 named_constructor = named_constructor_context(interface) | 255 named_constructor = named_constructor_context(interface) |
255 | 256 |
256 if constructors or custom_constructors or has_event_constructor or named_con
structor: | 257 if constructors or custom_constructors or has_event_constructor or named_con
structor: |
257 if interface.is_partial: | 258 if interface.is_partial: |
258 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' | 259 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' |
259 ' specified on partial interface definitions:' | 260 ' specified on partial interface definitions:' |
260 '%s' % interface.name) | 261 '%s' % interface.name) |
261 | 262 |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 deleter = next( | 1240 deleter = next( |
1240 method | 1241 method |
1241 for method in interface.operations | 1242 for method in interface.operations |
1242 if ('deleter' in method.specials and | 1243 if ('deleter' in method.specials and |
1243 len(method.arguments) == 1 and | 1244 len(method.arguments) == 1 and |
1244 str(method.arguments[0].idl_type) == 'DOMString')) | 1245 str(method.arguments[0].idl_type) == 'DOMString')) |
1245 except StopIteration: | 1246 except StopIteration: |
1246 return None | 1247 return None |
1247 | 1248 |
1248 return property_deleter(deleter) | 1249 return property_deleter(deleter) |
OLD | NEW |