| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 ActiveDOMObject* {{v8_class}}::toActiveDOMObject(v8::Handle<v8::Object> wrapper) | 456 ActiveDOMObject* {{v8_class}}::toActiveDOMObject(v8::Handle<v8::Object> wrapper) |
| 457 { | 457 { |
| 458 return toNative(wrapper); | 458 return toNative(wrapper); |
| 459 } | 459 } |
| 460 | 460 |
| 461 {% endif %} | 461 {% endif %} |
| 462 {% endblock %} | 462 {% endblock %} |
| 463 | 463 |
| 464 | 464 |
| 465 {##############################################################################} | 465 {##############################################################################} |
| 466 {% block wrap %} |
| 467 {% if special_wrap_for %} |
| 468 v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creation
Context, v8::Isolate* isolate) |
| 469 { |
| 470 ASSERT(impl); |
| 471 {% for special_wrap_interface in special_wrap_for %} |
| 472 if (impl->is{{special_wrap_interface}}()) |
| 473 return wrap(to{{special_wrap_interface}}(impl), creationContext, isolate
); |
| 474 {% endfor %} |
| 475 v8::Handle<v8::Object> wrapper = {{v8_class}}::createWrapper(impl, creationC
ontext, isolate); |
| 476 return wrapper; |
| 477 } |
| 478 |
| 479 {% endif %} |
| 480 {% endblock %} |
| 481 |
| 482 |
| 483 {##############################################################################} |
| 466 {% block create_wrapper %} | 484 {% block create_wrapper %} |
| 467 {% if not has_custom_to_v8 %} | 485 {% if not has_custom_to_v8 %} |
| 468 v8::Handle<v8::Object> {{v8_class}}::createWrapper(PassRefPtr<{{cpp_class}}> imp
l, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 486 v8::Handle<v8::Object> {{v8_class}}::createWrapper(PassRefPtr<{{cpp_class}}> imp
l, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 469 { | 487 { |
| 470 ASSERT(impl); | 488 ASSERT(impl); |
| 471 ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl.get(), isolate)); | 489 ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl.get(), isolate)); |
| 472 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 490 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
| 473 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 491 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
| 474 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 492 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
| 475 // the same object de-ref functions, though, so use that as the basis of
the check. | 493 // the same object de-ref functions, though, so use that as the basis of
the check. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 501 fromInternalPointer(object)->deref(); | 519 fromInternalPointer(object)->deref(); |
| 502 } | 520 } |
| 503 | 521 |
| 504 template<> | 522 template<> |
| 505 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 523 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 506 { | 524 { |
| 507 return toV8(impl, creationContext, isolate); | 525 return toV8(impl, creationContext, isolate); |
| 508 } | 526 } |
| 509 | 527 |
| 510 {% endblock %} | 528 {% endblock %} |
| OLD | NEW |