| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 is_check_security = 'CheckSecurity' in extended_attributes | 70 is_check_security = 'CheckSecurity' in extended_attributes |
| 71 if is_check_security: | 71 if is_check_security: |
| 72 includes.update(['bindings/v8/BindingSecurity.h', | 72 includes.update(['bindings/v8/BindingSecurity.h', |
| 73 'bindings/v8/ExceptionMessages.h', | 73 'bindings/v8/ExceptionMessages.h', |
| 74 'bindings/v8/ExceptionState.h']) | 74 'bindings/v8/ExceptionState.h']) |
| 75 | 75 |
| 76 template_contents = { | 76 template_contents = { |
| 77 'conditional_string': conditional_string(interface), # [Conditional] | 77 'conditional_string': conditional_string(interface), # [Conditional] |
| 78 'cpp_class_name': cpp_name(interface), | 78 'cpp_class_name': cpp_name(interface), |
| 79 'has_custom_legacy_call': 'CustomLegacyCall' in extended_attributes, #
[CustomLegacyCall] |
| 79 'has_resolve_wrapper_reachability': 'CustomIsReachable' in extended_attr
ibutes, # [CustomIsReachable] | 80 'has_resolve_wrapper_reachability': 'CustomIsReachable' in extended_attr
ibutes, # [CustomIsReachable] |
| 80 'header_includes': INTERFACE_H_INCLUDES, | 81 'header_includes': INTERFACE_H_INCLUDES, |
| 81 'interface_name': interface.name, | 82 'interface_name': interface.name, |
| 82 'is_active_dom_object': 'ActiveDOMObject' in extended_attributes, # [Ac
tiveDOMObject] | 83 'is_active_dom_object': 'ActiveDOMObject' in extended_attributes, # [Ac
tiveDOMObject] |
| 83 'is_check_security': is_check_security, | 84 'is_check_security': is_check_security, |
| 84 'is_dependent_lifetime': 'DependentLifetime' in extended_attributes, #
[DependentLifetime] | 85 'is_dependent_lifetime': 'DependentLifetime' in extended_attributes, #
[DependentLifetime] |
| 85 'v8_class_name': v8_class_name, | 86 'v8_class_name': v8_class_name, |
| 86 } | 87 } |
| 87 | 88 |
| 88 template_contents.update({ | 89 template_contents.update({ |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 '%s->IsString()' % cpp_value, | 239 '%s->IsString()' % cpp_value, |
| 239 '%s->IsObject()' % cpp_value]) | 240 '%s->IsObject()' % cpp_value]) |
| 240 if v8_types.array_or_sequence_type(idl_type): | 241 if v8_types.array_or_sequence_type(idl_type): |
| 241 return '%s->IsArray()' % cpp_value | 242 return '%s->IsArray()' % cpp_value |
| 242 if v8_types.is_wrapper_type(idl_type): | 243 if v8_types.is_wrapper_type(idl_type): |
| 243 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(),
worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value) | 244 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(),
worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value) |
| 244 if argument['is_nullable']: | 245 if argument['is_nullable']: |
| 245 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check]) | 246 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check]) |
| 246 return type_check | 247 return type_check |
| 247 return None | 248 return None |
| OLD | NEW |