OLD | NEW |
1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% block indexed_property_getter %} | 5 {% block indexed_property_getter %} |
6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
7 {% set getter = indexed_property_getter %} | 7 {% set getter = indexed_property_getter %} |
8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
9 { | 9 { |
10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 } | 528 } |
529 {# No match, throw error #} | 529 {# No match, throw error #} |
530 exceptionState.throwTypeError("No matching constructor signature."); | 530 exceptionState.throwTypeError("No matching constructor signature."); |
531 exceptionState.throwIfNeeded(); | 531 exceptionState.throwIfNeeded(); |
532 } | 532 } |
533 | 533 |
534 {% endif %} | 534 {% endif %} |
535 {% endblock %} | 535 {% endblock %} |
536 | 536 |
537 {##############################################################################} | 537 {##############################################################################} |
538 | |
539 {% block trace_wrappers %} | |
540 {% if trace_wrappers %} | |
541 DEFINE_TRACE_WRAPPERS({{cpp_class_or_partial}}) | |
542 { | |
543 {% for traceable in trace_wrappers %} | |
544 visitor->traceWrappers({{traceable}}()); | |
545 {% endfor %} | |
546 {% if parent_interface %} | |
547 {{parent_interface}}::traceWrappers(visitor); | |
548 {% endif %} | |
549 } | |
550 {% endif %} | |
551 {% endblock %} | |
552 | |
553 {##############################################################################} | |
554 {% block visit_dom_wrapper %} | 538 {% block visit_dom_wrapper %} |
555 {% if set_wrapper_reference_from or set_wrapper_reference_to %} | 539 {% if set_wrapper_reference_from or set_wrapper_reference_to %} |
556 void {{v8_class}}::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* script
Wrappable, const v8::Persistent<v8::Object>& wrapper) | 540 void {{v8_class}}::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* script
Wrappable, const v8::Persistent<v8::Object>& wrapper) |
557 { | 541 { |
558 {{cpp_class}}* impl = scriptWrappable->toImpl<{{cpp_class}}>(); | 542 {{cpp_class}}* impl = scriptWrappable->toImpl<{{cpp_class}}>(); |
559 {% if set_wrapper_reference_to %} | 543 {% if set_wrapper_reference_to %} |
560 v8::Local<v8::Object> context = v8::Local<v8::Object>::New(isolate, wrapper)
; | 544 v8::Local<v8::Object> context = v8::Local<v8::Object>::New(isolate, wrapper)
; |
561 v8::Context::Scope scope(context->CreationContext()); | 545 v8::Context::Scope scope(context->CreationContext()); |
562 {{set_wrapper_reference_to.cpp_type}} {{set_wrapper_reference_to.name}} = im
pl->{{set_wrapper_reference_to.name}}(); | 546 {{set_wrapper_reference_to.cpp_type}} {{set_wrapper_reference_to.name}} = im
pl->{{set_wrapper_reference_to.name}}(); |
563 if ({{set_wrapper_reference_to.name}}) { | 547 if ({{set_wrapper_reference_to.name}}) { |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 | 927 |
944 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 928 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
945 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 929 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
946 { | 930 { |
947 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 931 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
948 } | 932 } |
949 | 933 |
950 {% endfor %} | 934 {% endfor %} |
951 {% endif %} | 935 {% endif %} |
952 {% endblock %} | 936 {% endblock %} |
OLD | NEW |