| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 if constructors or custom_constructors or has_event_constructor or named_con
structor: | 237 if constructors or custom_constructors or has_event_constructor or named_con
structor: |
| 238 if interface.is_partial: | 238 if interface.is_partial: |
| 239 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' | 239 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' |
| 240 ' specified on partial interface definitions:' | 240 ' specified on partial interface definitions:' |
| 241 '%s' % interface.name) | 241 '%s' % interface.name) |
| 242 | 242 |
| 243 includes.add('bindings/core/v8/V8ObjectConstructor.h') | 243 includes.add('bindings/core/v8/V8ObjectConstructor.h') |
| 244 includes.add('core/frame/LocalDOMWindow.h') | 244 includes.add('core/frame/LocalDOMWindow.h') |
| 245 | 245 |
| 246 # [Unscopeable] attributes and methods | |
| 247 unscopeables = [] | |
| 248 for attribute in interface.attributes: | |
| 249 if 'Unscopeable' in attribute.extended_attributes: | |
| 250 unscopeables.append(attribute.name) | |
| 251 for method in interface.operations: | |
| 252 if 'Unscopeable' in method.extended_attributes: | |
| 253 unscopeables.append(method.name) | |
| 254 | |
| 255 context.update({ | 246 context.update({ |
| 256 'any_type_attributes': any_type_attributes, | 247 'any_type_attributes': any_type_attributes, |
| 257 'constructors': constructors, | 248 'constructors': constructors, |
| 258 'has_custom_constructor': bool(custom_constructors), | 249 'has_custom_constructor': bool(custom_constructors), |
| 259 'has_event_constructor': has_event_constructor, | 250 'has_event_constructor': has_event_constructor, |
| 260 'interface_length': | 251 'interface_length': |
| 261 interface_length(interface, constructors + custom_constructors), | 252 interface_length(interface, constructors + custom_constructors), |
| 262 'is_constructor_raises_exception': extended_attributes.get('RaisesExcept
ion') == 'Constructor', # [RaisesException=Constructor] | 253 'is_constructor_raises_exception': extended_attributes.get('RaisesExcept
ion') == 'Constructor', # [RaisesException=Constructor] |
| 263 'named_constructor': named_constructor, | 254 'named_constructor': named_constructor, |
| 264 'unscopeables': sorted(unscopeables), | |
| 265 }) | 255 }) |
| 266 | 256 |
| 267 constants = [constant_context(constant, interface) for constant in interface
.constants] | 257 constants = [constant_context(constant, interface) for constant in interface
.constants] |
| 268 | 258 |
| 269 special_getter_constants = [] | 259 special_getter_constants = [] |
| 270 runtime_enabled_constants = [] | 260 runtime_enabled_constants = [] |
| 271 constant_configuration_constants = [] | 261 constant_configuration_constants = [] |
| 272 | 262 |
| 273 for constant in constants: | 263 for constant in constants: |
| 274 if constant['measure_as'] or constant['deprecate_as']: | 264 if constant['measure_as'] or constant['deprecate_as']: |
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 | 1329 |
| 1340 extended_attributes = deleter.extended_attributes | 1330 extended_attributes = deleter.extended_attributes |
| 1341 idl_type = deleter.idl_type | 1331 idl_type = deleter.idl_type |
| 1342 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1332 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1343 return { | 1333 return { |
| 1344 'is_call_with_script_state': is_call_with_script_state, | 1334 'is_call_with_script_state': is_call_with_script_state, |
| 1345 'is_custom': 'Custom' in extended_attributes, | 1335 'is_custom': 'Custom' in extended_attributes, |
| 1346 'is_raises_exception': 'RaisesException' in extended_attributes, | 1336 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1347 'name': cpp_name(deleter), | 1337 'name': cpp_name(deleter), |
| 1348 } | 1338 } |
| OLD | NEW |