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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 {% from 'methods.cpp' import generate_constructor with context %} | 467 {% from 'methods.cpp' import generate_constructor with context %} |
468 {% if named_constructor %} | 468 {% if named_constructor %} |
469 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class | 469 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class |
470 if active_scriptwrappable else '0' %} | 470 if active_scriptwrappable else '0' %} |
471 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial | 471 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
472 // and does not depend on another global objects. | 472 // and does not depend on another global objects. |
473 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 473 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
474 #pragma clang diagnostic push | 474 #pragma clang diagnostic push |
475 #pragma clang diagnostic ignored "-Wglobal-constructors" | 475 #pragma clang diagnostic ignored "-Wglobal-constructors" |
476 #endif | 476 #endif |
477 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::trace, {{v8_class}}:
:traceWrappers, {{to_active_scriptwrappable}}, 0, {{v8_class}}::preparePrototype
AndInterfaceObject,{% if has_conditional_attributes_on_instance %} {{v8_class}}:
:installConditionallyEnabledProperties{% else %} nullptr{% endif %}, "{{interfac
e_name}}", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wr
apper_class_id}}, WrapperTypeInfo::{{event_target_inheritance}}, WrapperTypeInfo
::{{lifetime}} }; | 477 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::getHeapObjectHeader,
{{v8_class}}::trace, {{to_active_scriptwrappable}}, 0, {{v8_class}}::preparePro
totypeAndInterfaceObject,{% if has_conditional_attributes_on_instance %} {{v8_cl
ass}}::installConditionallyEnabledProperties{% else %} nullptr{% endif %}, "{{in
terface_name}}", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo
::{{wrapper_class_id}}, WrapperTypeInfo::{{event_target_inheritance}}, WrapperTy
peInfo::{{lifetime}} }; |
478 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 478 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
479 #pragma clang diagnostic pop | 479 #pragma clang diagnostic pop |
480 #endif | 480 #endif |
481 | 481 |
482 {{generate_constructor(named_constructor)}} | 482 {{generate_constructor(named_constructor)}} |
483 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) | 483 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) |
484 { | 484 { |
485 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 485 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
486 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 486 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
487 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world,
&domTemplateKey); | 487 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world,
&domTemplateKey); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 | 934 |
935 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 935 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
936 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 936 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
937 { | 937 { |
938 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 938 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
939 } | 939 } |
940 | 940 |
941 {% endfor %} | 941 {% endfor %} |
942 {% endif %} | 942 {% endif %} |
943 {% endblock %} | 943 {% endblock %} |
OLD | NEW |