| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 442 ActiveDOMObject* {{v8_class}}::toActiveDOMObject(v8::Handle<v8::Object> wrapper) | 442 ActiveDOMObject* {{v8_class}}::toActiveDOMObject(v8::Handle<v8::Object> wrapper) | 
| 443 { | 443 { | 
| 444     return toNative(wrapper); | 444     return toNative(wrapper); | 
| 445 } | 445 } | 
| 446 | 446 | 
| 447 {% endif %} | 447 {% endif %} | 
| 448 {% endblock %} | 448 {% endblock %} | 
| 449 | 449 | 
| 450 | 450 | 
| 451 {##############################################################################} | 451 {##############################################################################} | 
| 452 {% block create_wrapper_and_deref_object %} | 452 {% block create_wrapper %} | 
|  | 453 {% if not has_custom_to_v8 %} | 
| 453 v8::Handle<v8::Object> {{v8_class}}::createWrapper(PassRefPtr<{{cpp_class}}> imp
     l, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 454 v8::Handle<v8::Object> {{v8_class}}::createWrapper(PassRefPtr<{{cpp_class}}> imp
     l, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 
| 454 { | 455 { | 
| 455     ASSERT(impl); | 456     ASSERT(impl); | 
| 456     ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl.get(), isolate)); | 457     ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl.get(), isolate)); | 
| 457     if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 458     if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 
| 458         const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
     ct(impl.get()); | 459         const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
     ct(impl.get()); | 
| 459         // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
     TypeInfo. These will both have | 460         // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
     TypeInfo. These will both have | 
| 460         // the same object de-ref functions, though, so use that as the basis of
      the check. | 461         // the same object de-ref functions, though, so use that as the basis of
      the check. | 
| 461         RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
      == wrapperTypeInfo.derefObjectFunction); | 462         RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
      == wrapperTypeInfo.derefObjectFunction); | 
| 462     } | 463     } | 
| 463 | 464 | 
| 464     v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
     , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 465     v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
     , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 
| 465     if (UNLIKELY(wrapper.IsEmpty())) | 466     if (UNLIKELY(wrapper.IsEmpty())) | 
| 466         return wrapper; | 467         return wrapper; | 
| 467 | 468 | 
| 468     installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 469     installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 
| 469     {% set wrapper_configuration = 'WrapperConfiguration::Dependent' | 470     {% set wrapper_configuration = 'WrapperConfiguration::Dependent' | 
| 470                                    if (has_visit_dom_wrapper or | 471                                    if (has_visit_dom_wrapper or | 
| 471                                        is_active_dom_object or | 472                                        is_active_dom_object or | 
| 472                                        is_dependent_lifetime) else | 473                                        is_dependent_lifetime) else | 
| 473                                    'WrapperConfiguration::Independent' %} | 474                                    'WrapperConfiguration::Independent' %} | 
| 474     V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl, &wrapperTypeInf
     o, wrapper, isolate, {{wrapper_configuration}}); | 475     V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl, &wrapperTypeInf
     o, wrapper, isolate, {{wrapper_configuration}}); | 
| 475     return wrapper; | 476     return wrapper; | 
| 476 } | 477 } | 
| 477 | 478 | 
|  | 479 {% endif %} | 
|  | 480 {% endblock %} | 
|  | 481 | 
|  | 482 | 
|  | 483 {##############################################################################} | 
|  | 484 {% block deref_object_and_to_v8_no_inline %} | 
| 478 void {{v8_class}}::derefObject(void* object) | 485 void {{v8_class}}::derefObject(void* object) | 
| 479 { | 486 { | 
| 480     fromInternalPointer(object)->deref(); | 487     fromInternalPointer(object)->deref(); | 
| 481 } | 488 } | 
| 482 | 489 | 
| 483 template<> | 490 template<> | 
| 484 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
     reationContext, v8::Isolate* isolate) | 491 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
     reationContext, v8::Isolate* isolate) | 
| 485 { | 492 { | 
| 486     return toV8(impl, creationContext, isolate); | 493     return toV8(impl, creationContext, isolate); | 
| 487 } | 494 } | 
| 488 | 495 | 
| 489 {% endblock %} | 496 {% endblock %} | 
| OLD | NEW | 
|---|