| 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 484 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 485 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 485 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 486 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 486 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 487 if (!result.IsEmpty()) | 487 if (!result.IsEmpty()) |
| 488 return result; | 488 return result; |
| 489 | 489 |
| 490 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | 490 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); |
| 491 result = v8::FunctionTemplate::New(isolate, {{v8_class}}ConstructorCallback)
; | 491 result = v8::FunctionTemplate::New(isolate, {{v8_class}}ConstructorCallback)
; |
| 492 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); | 492 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); |
| 493 instanceTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount); | 493 instanceTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount); |
| 494 result->SetClassName(v8AtomicString(isolate, "{{cpp_class}}")); | |
| 495 result->Inherit({{v8_class}}::domTemplate(isolate)); | 494 result->Inherit({{v8_class}}::domTemplate(isolate)); |
| 496 data->setDOMTemplate(&domTemplateKey, result); | 495 data->setDOMTemplate(&domTemplateKey, result); |
| 497 return result; | 496 return result; |
| 498 } | 497 } |
| 499 | 498 |
| 500 {% endif %} | 499 {% endif %} |
| 501 {% endblock %} | 500 {% endblock %} |
| 502 | 501 |
| 503 {##############################################################################} | 502 {##############################################################################} |
| 504 {% block overloaded_constructor %} | 503 {% block overloaded_constructor %} |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 } | 942 } |
| 944 | 943 |
| 945 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 944 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
| 946 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 945 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 947 { | 946 { |
| 948 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 947 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
| 949 } | 948 } |
| 950 {% endfor %} | 949 {% endfor %} |
| 951 {% endif %} | 950 {% endif %} |
| 952 {% endblock %} | 951 {% endblock %} |
| OLD | NEW |