Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: Source/bindings/templates/interface.cpp

Issue 1017733003: [DO NOT LAND] Set @@toStringTag for DOM object prototypes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More test rebaselines Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 static int domTemplateKey; // This address is used for a key to look up the dom template. 504 static int domTemplateKey; // This address is used for a key to look up the dom template.
505 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 505 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
506 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 506 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
507 if (!result.IsEmpty()) 507 if (!result.IsEmpty())
508 return result; 508 return result;
509 509
510 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); 510 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate");
511 result = v8::FunctionTemplate::New(isolate, {{v8_class}}ConstructorCallback) ; 511 result = v8::FunctionTemplate::New(isolate, {{v8_class}}ConstructorCallback) ;
512 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); 512 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate();
513 instanceTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount); 513 instanceTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount);
514 result->SetClassName(v8AtomicString(isolate, "{{cpp_class}}")); 514 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is olate, "{{cpp_class}}"));
515 result->Inherit({{v8_class}}::domTemplate(isolate)); 515 result->Inherit({{v8_class}}::domTemplate(isolate));
516 data->setDOMTemplate(&domTemplateKey, result); 516 data->setDOMTemplate(&domTemplateKey, result);
517 return result; 517 return result;
518 } 518 }
519 519
520 {% endif %} 520 {% endif %}
521 {% endblock %} 521 {% endblock %}
522 522
523 {##############################################################################} 523 {##############################################################################}
524 {% block overloaded_constructor %} 524 {% block overloaded_constructor %}
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 } 1030 }
1031 1031
1032 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 1032 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
1033 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 1033 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
1034 { 1034 {
1035 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 1035 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
1036 } 1036 }
1037 {% endfor %} 1037 {% endfor %}
1038 {% endif %} 1038 {% endif %}
1039 {% endblock %} 1039 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698