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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 {% from 'methods.cpp' import generate_constructor with context %} | 479 {% from 'methods.cpp' import generate_constructor with context %} |
480 {% if named_constructor %} | 480 {% if named_constructor %} |
481 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class | 481 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class |
482 if active_scriptwrappable else '0' %} | 482 if active_scriptwrappable else '0' %} |
483 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial | 483 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
484 // and does not depend on another global objects. | 484 // and does not depend on another global objects. |
485 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 485 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
486 #pragma clang diagnostic push | 486 #pragma clang diagnostic push |
487 #pragma clang diagnostic ignored "-Wglobal-constructors" | 487 #pragma clang diagnostic ignored "-Wglobal-constructors" |
488 #endif | 488 #endif |
489 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}} }; | 489 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}} }; |
490 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 490 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
491 #pragma clang diagnostic pop | 491 #pragma clang diagnostic pop |
492 #endif | 492 #endif |
493 | 493 |
494 {{generate_constructor(named_constructor)}} | 494 {{generate_constructor(named_constructor)}} |
495 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) | 495 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) |
496 { | 496 { |
497 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 497 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
498 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 498 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
499 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world,
&domTemplateKey); | 499 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world,
&domTemplateKey); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 | 946 |
947 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 947 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
948 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 948 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
949 { | 949 { |
950 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 950 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
951 } | 951 } |
952 | 952 |
953 {% endfor %} | 953 {% endfor %} |
954 {% endif %} | 954 {% endif %} |
955 {% endblock %} | 955 {% endblock %} |
OLD | NEW |