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

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

Issue 1366643003: [DO NOT LAND] Set @@toStringTag for DOM object prototypes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 static int domTemplateKey; // This address is used for a key to look up the dom template. 493 static int domTemplateKey; // This address is used for a key to look up the dom template.
494 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 494 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
495 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 495 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
496 if (!result.IsEmpty()) 496 if (!result.IsEmpty())
497 return result; 497 return result;
498 498
499 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); 499 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate");
500 result = v8::FunctionTemplate::New(isolate, {{v8_class}}ConstructorCallback) ; 500 result = v8::FunctionTemplate::New(isolate, {{v8_class}}ConstructorCallback) ;
501 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); 501 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate();
502 instanceTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount); 502 instanceTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount);
503 result->SetClassName(v8AtomicString(isolate, "{{cpp_class}}"));
504 result->Inherit({{v8_class}}::domTemplate(isolate)); 503 result->Inherit({{v8_class}}::domTemplate(isolate));
505 data->setDOMTemplate(&domTemplateKey, result); 504 data->setDOMTemplate(&domTemplateKey, result);
506 return result; 505 return result;
507 } 506 }
508 507
509 {% endif %} 508 {% endif %}
510 {% endblock %} 509 {% endblock %}
511 510
512 {##############################################################################} 511 {##############################################################################}
513 {% block overloaded_constructor %} 512 {% block overloaded_constructor %}
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 } 897 }
899 898
900 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 899 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
901 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 900 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
902 { 901 {
903 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 902 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
904 } 903 }
905 {% endfor %} 904 {% endfor %}
906 {% endif %} 905 {% endif %}
907 {% endblock %} 906 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698