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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
703 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); | 703 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); |
704 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have | 704 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have |
705 // the same object de-ref functions, though, so use that as the basis of the check. | 705 // the same object de-ref functions, though, so use that as the basis of the check. |
706 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction); | 706 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction); |
707 } | 707 } |
708 | 708 |
709 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 709 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
710 if (UNLIKELY(wrapper.IsEmpty())) | 710 if (UNLIKELY(wrapper.IsEmpty())) |
711 return wrapper; | 711 return wrapper; |
712 | 712 |
713 {% if is_audio_buffer %} | |
714 for (unsigned i = 0, n = impl->numberOfChannels(); i < n; i++) { | |
715 Float32Array* channelData = impl->getChannelData(i); | |
716 channelData->buffer()->setDeallocationObserver(V8ArrayBufferDeallocation Observer::instanceTemplate()); | |
haraken
2014/01/09 08:52:58
I don't fully understand why this code is written
Nils Barth (inactive)
2014/01/09 11:24:45
Will do!
Nils Barth (inactive)
2014/01/10 01:37:10
Hi Raymond,
We're currently rewriting the IDL comp
Ken Russell (switch to Gerrit)
2014/01/10 02:31:31
+dslomov
On 2014/01/10 01:37:10, Nils Barth wrote
Nils Barth (inactive)
2014/01/14 07:39:45
*ping* Dmitry: could you PTAL? Thanks!
Dmitry Lomov (no reviews)
2014/01/14 08:37:58
Yes, sorry, slipped through the cracks.
We only se
haraken
2014/01/14 09:27:06
What we want is to notify V8 the fact that Blink a
| |
717 } | |
718 {% endif %} | |
713 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 719 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
714 {% set wrapper_configuration = 'WrapperConfiguration::Dependent' | 720 {% set wrapper_configuration = 'WrapperConfiguration::Dependent' |
715 if (has_visit_dom_wrapper or | 721 if (has_visit_dom_wrapper or |
716 is_active_dom_object or | 722 is_active_dom_object or |
717 is_dependent_lifetime) else | 723 is_dependent_lifetime) else |
718 'WrapperConfiguration::Independent' %} | 724 'WrapperConfiguration::Independent' %} |
719 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl, &wrapperTypeInf o, wrapper, isolate, {{wrapper_configuration}}); | 725 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl, &wrapperTypeInf o, wrapper, isolate, {{wrapper_configuration}}); |
720 return wrapper; | 726 return wrapper; |
721 } | 727 } |
722 | 728 |
723 {% endif %} | 729 {% endif %} |
724 {% endblock %} | 730 {% endblock %} |
725 | 731 |
726 | 732 |
727 {##############################################################################} | 733 {##############################################################################} |
728 {% block deref_object_and_to_v8_no_inline %} | 734 {% block deref_object_and_to_v8_no_inline %} |
729 void {{v8_class}}::derefObject(void* object) | 735 void {{v8_class}}::derefObject(void* object) |
730 { | 736 { |
731 fromInternalPointer(object)->deref(); | 737 fromInternalPointer(object)->deref(); |
732 } | 738 } |
733 | 739 |
734 template<> | 740 template<> |
735 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) | 741 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) |
736 { | 742 { |
737 return toV8(impl, creationContext, isolate); | 743 return toV8(impl, creationContext, isolate); |
738 } | 744 } |
739 | 745 |
740 {% endblock %} | 746 {% endblock %} |
OLD | NEW |