| OLD | NEW |
| 1 {% extends 'interface_base.cpp.tmpl' %} | 1 {% extends 'interface_base.cpp.tmpl' %} |
| 2 | 2 |
| 3 {##############################################################################} | 3 {##############################################################################} |
| 4 {% block indexed_property_getter %} | 4 {% block indexed_property_getter %} |
| 5 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 5 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
| 6 {% set getter = indexed_property_getter %} | 6 {% set getter = indexed_property_getter %} |
| 7 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) { | 7 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) { |
| 8 {% if getter.is_raises_exception %} | 8 {% if getter.is_raises_exception %} |
| 9 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::IndexedGetter
Context, "{{interface_name}}"); | 9 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::IndexedGetter
Context, "{{interface_name}}"); |
| 10 {% endif %} | 10 {% endif %} |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 {% set active_scriptwrappable_inheritance = | 519 {% set active_scriptwrappable_inheritance = |
| 520 'InheritFromActiveScriptWrappable' | 520 'InheritFromActiveScriptWrappable' |
| 521 if active_scriptwrappable else | 521 if active_scriptwrappable else |
| 522 'NotInheritFromActiveScriptWrappable' %} | 522 'NotInheritFromActiveScriptWrappable' %} |
| 523 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial | 523 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 524 // and does not depend on another global objects. | 524 // and does not depend on another global objects. |
| 525 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 525 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 526 #pragma clang diagnostic push | 526 #pragma clang diagnostic push |
| 527 #pragma clang diagnostic ignored "-Wglobal-constructors" | 527 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 528 #endif | 528 #endif |
| 529 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::trace, {{v8_class}}:
:traceWrappers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{
{interface_name}}", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeI
nfo::{{wrapper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance
}}, WrapperTypeInfo::{{lifetime}} }; | 529 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, &BindingSecurity::securityCheckFor
ClassesWithoutAccessCheckCallbacks, {{v8_class}}::trace, {{v8_class}}::traceWrap
pers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{{interface
_name}}", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wra
pper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance}}, Wrappe
rTypeInfo::{{lifetime}} }; |
| 530 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 530 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 531 #pragma clang diagnostic pop | 531 #pragma clang diagnostic pop |
| 532 #endif | 532 #endif |
| 533 | 533 |
| 534 {{generate_constructor(named_constructor)}} | 534 {{generate_constructor(named_constructor)}} |
| 535 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) { | 535 v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate
* isolate, const DOMWrapperWorld& world) { |
| 536 static int domTemplateKey; // This address is used for a key to look up the do
m template. | 536 static int domTemplateKey; // This address is used for a key to look up the do
m template. |
| 537 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 537 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 538 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world, &d
omTemplateKey); | 538 v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world, &d
omTemplateKey); |
| 539 if (!result.IsEmpty()) | 539 if (!result.IsEmpty()) |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 } | 922 } |
| 923 | 923 |
| 924 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 924 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
| 925 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { | 925 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { |
| 926 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 926 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
| 927 } | 927 } |
| 928 | 928 |
| 929 {% endfor %} | 929 {% endfor %} |
| 930 {% endif %} | 930 {% endif %} |
| 931 {% endblock %} | 931 {% endblock %} |
| OLD | NEW |