| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 idl_type = attribute.data_type | 66 idl_type = attribute.data_type |
| 67 # FIXME: need to check should_keep_attribute_alive, but for now sufficient | 67 # FIXME: need to check should_keep_attribute_alive, but for now sufficient |
| 68 # to check if primitive. | 68 # to check if primitive. |
| 69 should_keep_attribute_alive = not v8_types.primitive_type(idl_type) | 69 should_keep_attribute_alive = not v8_types.primitive_type(idl_type) |
| 70 if should_keep_attribute_alive: | 70 if should_keep_attribute_alive: |
| 71 return_v8_value_statement = None # unused | 71 return_v8_value_statement = None # unused |
| 72 includes = v8_types.includes_for_type(idl_type) | 72 includes = v8_types.includes_for_type(idl_type) |
| 73 includes.add('bindings/v8/V8HiddenPropertyName.h') | 73 includes.add('bindings/v8/V8HiddenPropertyName.h') |
| 74 else: | 74 else: |
| 75 cpp_value = 'imp->%s()' % uncapitalize(attribute.name) | 75 cpp_value = 'imp->%s()' % uncapitalize(attribute.name) |
| 76 return_v8_value_statement = v8_types.v8_set_return_value(idl_type, cpp_v
alue, callback_info='info') | 76 return_v8_value_statement, includes = v8_types.v8_set_return_value(idl_t
ype, cpp_value, callback_info='info', isolate='info.GetIsolate()', extended_attr
ibutes=attribute.extended_attributes) |
| 77 includes = [] | |
| 78 contents = { | 77 contents = { |
| 79 'name': attribute.name, | 78 'name': attribute.name, |
| 80 'conditional_string': generate_conditional_string(attribute), | 79 'conditional_string': generate_conditional_string(attribute), |
| 81 'cpp_method_name': cpp_method_name(attribute), | 80 'cpp_method_name': cpp_method_name(attribute), |
| 82 'cpp_type': v8_types.cpp_type(idl_type, pointer_type='RefPtr'), | 81 'cpp_type': v8_types.cpp_type(idl_type), |
| 83 'should_keep_attribute_alive': should_keep_attribute_alive, | 82 'should_keep_attribute_alive': should_keep_attribute_alive, |
| 84 'return_v8_value_statement': return_v8_value_statement, | 83 'return_v8_value_statement': return_v8_value_statement, |
| 85 'v8_type': v8_types.v8_type(idl_type), | 84 'v8_type': v8_types.v8_type(idl_type), |
| 86 } | 85 } |
| 87 return contents, includes | 86 return contents, includes |
| OLD | NEW |