| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 set_wrapper_reference_to['idl_type'].add_includes_for_type() | 210 set_wrapper_reference_to['idl_type'].add_includes_for_type() |
| 211 | 211 |
| 212 # [Custom=VisitDOMWrapper] | 212 # [Custom=VisitDOMWrapper] |
| 213 has_visit_dom_wrapper = ( | 213 has_visit_dom_wrapper = ( |
| 214 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or | 214 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or |
| 215 set_wrapper_reference_from or set_wrapper_reference_to) | 215 set_wrapper_reference_from or set_wrapper_reference_to) |
| 216 | 216 |
| 217 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod
e') else 'ObjectClassId') | 217 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod
e') else 'ObjectClassId') |
| 218 | 218 |
| 219 # [ActiveScriptWrappable] must be accompanied with [DependentLifetime]. |
| 220 if active_scriptwrappable and not is_dependent_lifetime: |
| 221 raise Exception('[ActiveScriptWrappable] interface must also specify ' |
| 222 '[DependentLifetime]: %s' % interface.name) |
| 223 |
| 219 v8_class_name = v8_utilities.v8_class_name(interface) | 224 v8_class_name = v8_utilities.v8_class_name(interface) |
| 220 cpp_class_name = cpp_name(interface) | 225 cpp_class_name = cpp_name(interface) |
| 221 cpp_class_name_or_partial = cpp_name_or_partial(interface) | 226 cpp_class_name_or_partial = cpp_name_or_partial(interface) |
| 222 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface) | 227 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface) |
| 223 | 228 |
| 224 context = { | 229 context = { |
| 225 'cpp_class': cpp_class_name, | 230 'cpp_class': cpp_class_name, |
| 226 'cpp_class_or_partial': cpp_class_name_or_partial, | 231 'cpp_class_or_partial': cpp_class_name_or_partial, |
| 227 'event_target_inheritance': 'InheritFromEventTarget' if is_event_target
else 'NotInheritFromEventTarget', | 232 'event_target_inheritance': 'InheritFromEventTarget' if is_event_target
else 'NotInheritFromEventTarget', |
| 228 'is_gc_type': True, | 233 'is_gc_type': True, |
| (...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 extended_attributes = deleter.extended_attributes | 1406 extended_attributes = deleter.extended_attributes |
| 1402 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1407 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1403 is_ce_reactions = 'CEReactions' in extended_attributes | 1408 is_ce_reactions = 'CEReactions' in extended_attributes |
| 1404 return { | 1409 return { |
| 1405 'is_call_with_script_state': is_call_with_script_state, | 1410 'is_call_with_script_state': is_call_with_script_state, |
| 1406 'is_ce_reactions': is_ce_reactions, | 1411 'is_ce_reactions': is_ce_reactions, |
| 1407 'is_custom': 'Custom' in extended_attributes, | 1412 'is_custom': 'Custom' in extended_attributes, |
| 1408 'is_raises_exception': 'RaisesException' in extended_attributes, | 1413 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1409 'name': cpp_name(deleter), | 1414 'name': cpp_name(deleter), |
| 1410 } | 1415 } |
| OLD | NEW |