| 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 (interface_name, attribute.name) | 8 (interface_name, 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 {##############################################################################} | 131 {##############################################################################} |
| 132 {% block constructor %} | 132 {% block constructor %} |
| 133 {% if has_constructor %} | 133 {% if has_constructor %} |
| 134 {# FIXME: support overloading #} | 134 {# FIXME: support overloading #} |
| 135 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 135 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 136 { | 136 { |
| 137 {% if is_constructor_raises_exception %} | 137 {% if is_constructor_raises_exception %} |
| 138 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 138 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 139 {% endif %} | 139 {% endif %} |
| 140 {% if is_constructor_call_with_execution_context %} |
| 141 ExecutionContext* context = getExecutionContext(); |
| 142 {% endif %} |
| 143 {% if is_constructor_call_with_document %} |
| 144 Document& document = *toDocument(getExecutionContext()); |
| 145 {% endif %} |
| 140 RefPtr<{{cpp_class}}> impl = {{cpp_class}}::create({{constructor_arguments |
join(', ')}}); | 146 RefPtr<{{cpp_class}}> impl = {{cpp_class}}::create({{constructor_arguments |
join(', ')}}); |
| 141 v8::Handle<v8::Object> wrapper = info.Holder(); | 147 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 142 {% if is_constructor_raises_exception %} | 148 {% if is_constructor_raises_exception %} |
| 143 if (exceptionState.throwIfNeeded()) | 149 if (exceptionState.throwIfNeeded()) |
| 144 return; | 150 return; |
| 145 {% endif %} | 151 {% endif %} |
| 146 | 152 |
| 147 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{v8
_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Dep
endent); | 153 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{v8
_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Dep
endent); |
| 148 v8SetReturnValue(info, wrapper); | 154 v8SetReturnValue(info, wrapper); |
| 149 } | 155 } |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 fromInternalPointer(object)->deref(); | 626 fromInternalPointer(object)->deref(); |
| 621 } | 627 } |
| 622 | 628 |
| 623 template<> | 629 template<> |
| 624 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 630 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 625 { | 631 { |
| 626 return toV8(impl, creationContext, isolate); | 632 return toV8(impl, creationContext, isolate); |
| 627 } | 633 } |
| 628 | 634 |
| 629 {% endblock %} | 635 {% endblock %} |
| OLD | NEW |