| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% macro attribute_configuration(attribute) %} | 5 {% macro attribute_configuration(attribute) %} |
| 6 {% set getter_callback = | 6 {% set getter_callback = |
| 7 '%sV8Internal::%sAttributeGetterCallback' % | 7 '%sV8Internal::%sAttributeGetterCallback' % |
| 8 (cpp_class, attribute.name) | 8 (cpp_class, attribute.name) |
| 9 if not attribute.constructor_type else | 9 if not attribute.constructor_type else |
| 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} | 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 | 145 |
| 146 {##############################################################################} | 146 {##############################################################################} |
| 147 {% block indexed_property_setter %} | 147 {% block indexed_property_setter %} |
| 148 {% if indexed_property_setter and not indexed_property_setter.is_custom %} | 148 {% if indexed_property_setter and not indexed_property_setter.is_custom %} |
| 149 {% set setter = indexed_property_setter %} | 149 {% set setter = indexed_property_setter %} |
| 150 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) | 150 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 151 { | 151 { |
| 152 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 152 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); |
| 153 {{setter.v8_value_to_local_cpp_value}}; | 153 {{setter.v8_value_to_local_cpp_value}}; |
| 154 {% if setter.is_raises_exception %} | 154 {% if setter.has_exception_state %} |
| 155 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 155 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 156 {% endif %} | 156 {% endif %} |
| 157 {% set setter_name = setter.name or 'anonymousIndexedSetter' %} | 157 {% set setter_name = setter.name or 'anonymousIndexedSetter' %} |
| 158 {% set setter_arguments = ['index', 'propertyValue', 'exceptionState'] | 158 {% set setter_arguments = ['index', 'propertyValue', 'exceptionState'] |
| 159 if setter.is_raises_exception else ['index', 'propertyValue'] %} | 159 if setter.is_raises_exception else ['index', 'propertyValue'] %} |
| 160 bool result = collection->{{setter_name}}({{setter_arguments|join(', ')}}); | 160 bool result = collection->{{setter_name}}({{setter_arguments|join(', ')}}); |
| 161 {% if setter.is_raises_exception %} | 161 {% if setter.is_raises_exception %} |
| 162 if (exceptionState.throwIfNeeded()) | 162 if (exceptionState.throwIfNeeded()) |
| 163 return; | 163 return; |
| 164 {% endif %} | 164 {% endif %} |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 303 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 304 return; | 304 return; |
| 305 if (info.Holder()->HasRealNamedProperty(name)) | 305 if (info.Holder()->HasRealNamedProperty(name)) |
| 306 return; | 306 return; |
| 307 | 307 |
| 308 {% endif %} | 308 {% endif %} |
| 309 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 309 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); |
| 310 {# v8_value_to_local_cpp_value('DOMString', 'name', 'propertyName') #} | 310 {# v8_value_to_local_cpp_value('DOMString', 'name', 'propertyName') #} |
| 311 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; | 311 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; |
| 312 {{setter.v8_value_to_local_cpp_value}}; | 312 {{setter.v8_value_to_local_cpp_value}}; |
| 313 {% if setter.is_raises_exception %} | 313 {% if setter.has_exception_state %} |
| 314 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 314 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 315 {% endif %} | 315 {% endif %} |
| 316 {% set setter_name = setter.name or 'anonymousNamedSetter' %} | 316 {% set setter_name = setter.name or 'anonymousNamedSetter' %} |
| 317 {% set setter_arguments = | 317 {% set setter_arguments = |
| 318 ['propertyName', 'propertyValue', 'exceptionState'] | 318 ['propertyName', 'propertyValue', 'exceptionState'] |
| 319 if setter.is_raises_exception else | 319 if setter.is_raises_exception else |
| 320 ['propertyName', 'propertyValue'] %} | 320 ['propertyName', 'propertyValue'] %} |
| 321 bool result = collection->{{setter_name}}({{setter_arguments|join(', ')}}); | 321 bool result = collection->{{setter_name}}({{setter_arguments|join(', ')}}); |
| 322 {% if setter.is_raises_exception %} | 322 {% if setter.is_raises_exception %} |
| 323 if (exceptionState.throwIfNeeded()) | 323 if (exceptionState.throwIfNeeded()) |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 fromInternalPointer(object)->deref(); | 1173 fromInternalPointer(object)->deref(); |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 template<> | 1176 template<> |
| 1177 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 1177 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 1178 { | 1178 { |
| 1179 return toV8(impl, creationContext, isolate); | 1179 return toV8(impl, creationContext, isolate); |
| 1180 } | 1180 } |
| 1181 | 1181 |
| 1182 {% endblock %} | 1182 {% endblock %} |
| OLD | NEW |