Chromium Code Reviews| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 import v8_utilities | 47 import v8_utilities |
| 48 from v8_utilities import (cpp_name_or_partial, cpp_name, has_extended_attribute_ value, | 48 from v8_utilities import (cpp_name_or_partial, cpp_name, has_extended_attribute_ value, |
| 49 runtime_enabled_feature_name, is_legacy_interface_type _checking) | 49 runtime_enabled_feature_name, is_legacy_interface_type _checking) |
| 50 | 50 |
| 51 | 51 |
| 52 INTERFACE_H_INCLUDES = frozenset([ | 52 INTERFACE_H_INCLUDES = frozenset([ |
| 53 'bindings/core/v8/ScriptWrappable.h', | 53 'bindings/core/v8/ScriptWrappable.h', |
| 54 'bindings/core/v8/ToV8.h', | 54 'bindings/core/v8/ToV8.h', |
| 55 'bindings/core/v8/V8Binding.h', | 55 'bindings/core/v8/V8Binding.h', |
| 56 'bindings/core/v8/V8DOMWrapper.h', | 56 'bindings/core/v8/V8DOMWrapper.h', |
| 57 'bindings/core/v8/V8PrivateProperty.h', | |
| 57 'bindings/core/v8/WrapperTypeInfo.h', | 58 'bindings/core/v8/WrapperTypeInfo.h', |
| 58 'platform/heap/Handle.h', | 59 'platform/heap/Handle.h', |
| 59 ]) | 60 ]) |
| 60 INTERFACE_CPP_INCLUDES = frozenset([ | 61 INTERFACE_CPP_INCLUDES = frozenset([ |
| 61 'bindings/core/v8/ExceptionState.h', | 62 'bindings/core/v8/ExceptionState.h', |
| 62 'bindings/core/v8/GeneratedCodeHelper.h', | 63 'bindings/core/v8/GeneratedCodeHelper.h', |
| 63 'bindings/core/v8/V8DOMConfiguration.h', | 64 'bindings/core/v8/V8DOMConfiguration.h', |
| 64 'bindings/core/v8/V8ObjectConstructor.h', | 65 'bindings/core/v8/V8ObjectConstructor.h', |
| 65 'core/dom/Document.h', | 66 'core/dom/Document.h', |
| 66 'wtf/GetPtr.h', | 67 'wtf/GetPtr.h', |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 # [NamedConstructor] | 326 # [NamedConstructor] |
| 326 named_constructor = named_constructor_context(interface) | 327 named_constructor = named_constructor_context(interface) |
| 327 | 328 |
| 328 if constructors or custom_constructors or named_constructor: | 329 if constructors or custom_constructors or named_constructor: |
| 329 if interface.is_partial: | 330 if interface.is_partial: |
| 330 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' | 331 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' |
| 331 ' specified on partial interface definitions: ' | 332 ' specified on partial interface definitions: ' |
| 332 '%s' % interface.name) | 333 '%s' % interface.name) |
| 333 | 334 |
| 334 includes.add('bindings/core/v8/V8ObjectConstructor.h') | 335 includes.add('bindings/core/v8/V8ObjectConstructor.h') |
| 335 includes.add('core/frame/LocalDOMWindow.h') | 336 includes.add('core/frame/LocalDOMWindow.h') |
|
Yuki
2017/01/19 09:57:28
You may want to add 'bindings/core/v8/V8PrivatePro
sashab
2017/01/20 04:37:05
Done :)
| |
| 336 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes: | 337 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes: |
| 337 if not interface.is_partial: | 338 if not interface.is_partial: |
| 338 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: ' | 339 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: ' |
| 339 '%s' % interface.name) | 340 '%s' % interface.name) |
| 340 | 341 |
| 341 # [Unscopable] attributes and methods | 342 # [Unscopable] attributes and methods |
| 342 unscopables = [] | 343 unscopables = [] |
| 343 for attribute in interface.attributes: | 344 for attribute in interface.attributes: |
| 344 if 'Unscopable' in attribute.extended_attributes: | 345 if 'Unscopable' in attribute.extended_attributes: |
| 345 unscopables.append((attribute.name, runtime_enabled_feature_name(att ribute))) | 346 unscopables.append((attribute.name, runtime_enabled_feature_name(att ribute))) |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1501 extended_attributes = deleter.extended_attributes | 1502 extended_attributes = deleter.extended_attributes |
| 1502 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') | 1503 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') |
| 1503 is_ce_reactions = 'CEReactions' in extended_attributes | 1504 is_ce_reactions = 'CEReactions' in extended_attributes |
| 1504 return { | 1505 return { |
| 1505 'is_call_with_script_state': is_call_with_script_state, | 1506 'is_call_with_script_state': is_call_with_script_state, |
| 1506 'is_ce_reactions': is_ce_reactions, | 1507 'is_ce_reactions': is_ce_reactions, |
| 1507 'is_custom': 'Custom' in extended_attributes, | 1508 'is_custom': 'Custom' in extended_attributes, |
| 1508 'is_raises_exception': 'RaisesException' in extended_attributes, | 1509 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1509 'name': cpp_name(deleter), | 1510 'name': cpp_name(deleter), |
| 1510 } | 1511 } |
| OLD | NEW |