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 |
246 context.update({ | 255 context.update({ |
247 'any_type_attributes': any_type_attributes, | 256 'any_type_attributes': any_type_attributes, |
248 'constructors': constructors, | 257 'constructors': constructors, |
249 'has_custom_constructor': bool(custom_constructors), | 258 'has_custom_constructor': bool(custom_constructors), |
250 'has_event_constructor': has_event_constructor, | 259 'has_event_constructor': has_event_constructor, |
251 'interface_length': | 260 'interface_length': |
252 interface_length(interface, constructors + custom_constructors), | 261 interface_length(interface, constructors + custom_constructors), |
253 'is_constructor_raises_exception': extended_attributes.get('RaisesExcept
ion') == 'Constructor', # [RaisesException=Constructor] | 262 'is_constructor_raises_exception': extended_attributes.get('RaisesExcept
ion') == 'Constructor', # [RaisesException=Constructor] |
254 'named_constructor': named_constructor, | 263 'named_constructor': named_constructor, |
| 264 'unscopeables': sorted(unscopeables), |
255 }) | 265 }) |
256 | 266 |
257 constants = [constant_context(constant, interface) for constant in interface
.constants] | 267 constants = [constant_context(constant, interface) for constant in interface
.constants] |
258 | 268 |
259 special_getter_constants = [] | 269 special_getter_constants = [] |
260 runtime_enabled_constants = [] | 270 runtime_enabled_constants = [] |
261 constant_configuration_constants = [] | 271 constant_configuration_constants = [] |
262 | 272 |
263 for constant in constants: | 273 for constant in constants: |
264 if constant['measure_as'] or constant['deprecate_as']: | 274 if constant['measure_as'] or constant['deprecate_as']: |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 | 1339 |
1330 extended_attributes = deleter.extended_attributes | 1340 extended_attributes = deleter.extended_attributes |
1331 idl_type = deleter.idl_type | 1341 idl_type = deleter.idl_type |
1332 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1342 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
1333 return { | 1343 return { |
1334 'is_call_with_script_state': is_call_with_script_state, | 1344 'is_call_with_script_state': is_call_with_script_state, |
1335 'is_custom': 'Custom' in extended_attributes, | 1345 'is_custom': 'Custom' in extended_attributes, |
1336 'is_raises_exception': 'RaisesException' in extended_attributes, | 1346 'is_raises_exception': 'RaisesException' in extended_attributes, |
1337 'name': cpp_name(deleter), | 1347 'name': cpp_name(deleter), |
1338 } | 1348 } |
OLD | NEW |