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