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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 {% from 'methods.cpp' import generate_constructor with context %} | 457 {% from 'methods.cpp' import generate_constructor with context %} |
458 {% if named_constructor %} | 458 {% if named_constructor %} |
459 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class | 459 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class |
460 if active_scriptwrappable else '0' %} | 460 if active_scriptwrappable else '0' %} |
461 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial | 461 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
462 // and does not depend on another global objects. | 462 // and does not depend on another global objects. |
463 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 463 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
464 #pragma clang diagnostic push | 464 #pragma clang diagnostic push |
465 #pragma clang diagnostic ignored "-Wglobal-constructors" | 465 #pragma clang diagnostic ignored "-Wglobal-constructors" |
466 #endif | 466 #endif |
467 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::trace, {{to_active_s
criptwrappable}}, 0, {{v8_class}}::preparePrototypeAndInterfaceObject, {{v8_clas
s}}::installConditionallyEnabledProperties, "{{interface_name}}", 0, WrapperType
Info::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, Wrapper
TypeInfo::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}} }; | 467 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::trace, {{to_active_s
criptwrappable}}, 0, {{v8_class}}::preparePrototypeAndInterfaceObject,{% if has_
conditional_attributes_on_instance %} {{v8_class}}::installConditionallyEnabledP
roperties{% else %} nullptr{% endif %}, "{{interface_name}}", 0, WrapperTypeInfo
::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperType
Info::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}} }; |
468 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 468 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
469 #pragma clang diagnostic pop | 469 #pragma clang diagnostic pop |
470 #endif | 470 #endif |
471 | 471 |
472 {{generate_constructor(named_constructor)}} | 472 {{generate_constructor(named_constructor)}} |
473 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) | 473 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) |
474 { | 474 { |
475 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 475 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
476 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 476 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
477 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world,
&domTemplateKey); | 477 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world,
&domTemplateKey); |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 | 927 |
928 {% 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 %} |
929 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>&)) |
930 { | 930 { |
931 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 931 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
932 } | 932 } |
933 | 933 |
934 {% endfor %} | 934 {% endfor %} |
935 {% endif %} | 935 {% endif %} |
936 {% endblock %} | 936 {% endblock %} |
OLD | NEW |