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

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

Issue 336653004: Decrease binary size by 43 KB by removing V8XXX::domTemplate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8SVGTestInterface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% extends 'interface_base.cpp' %} 1 {% extends 'interface_base.cpp' %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% macro attribute_configuration(attribute) %} 5 {% macro attribute_configuration(attribute) %}
6 {% set getter_callback = 6 {% set getter_callback =
7 '%sV8Internal::%sAttributeGetterCallback' % 7 '%sV8Internal::%sAttributeGetterCallback' %
8 (cpp_class, attribute.name) 8 (cpp_class, attribute.name)
9 if not attribute.constructor_type else 9 if not attribute.constructor_type else
10 ('%sV8Internal::%sConstructorGetterCallback' % 10 ('%sV8Internal::%sConstructorGetterCallback' %
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 {% endfor %} 1107 {% endfor %}
1108 {% endif %} 1108 {% endif %}
1109 {% endmacro %} 1109 {% endmacro %}
1110 1110
1111 1111
1112 {##############################################################################} 1112 {##############################################################################}
1113 {% block get_template %} 1113 {% block get_template %}
1114 {# FIXME: rename to get_dom_template and GetDOMTemplate #} 1114 {# FIXME: rename to get_dom_template and GetDOMTemplate #}
1115 v8::Handle<v8::FunctionTemplate> {{v8_class}}::domTemplate(v8::Isolate* isolate) 1115 v8::Handle<v8::FunctionTemplate> {{v8_class}}::domTemplate(v8::Isolate* isolate)
1116 { 1116 {
1117 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 1117 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), configure{{v8_class}}Template);
1118 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cas t<WrapperTypeInfo*>(&wrapperTypeInfo));
1119 if (!result.IsEmpty())
1120 return result;
1121
1122 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
1123 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons tructorMode);
1124 configure{{v8_class}}Template(result, isolate);
1125 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result) ;
1126 return result;
1127 } 1118 }
1128 1119
1129 {% endblock %} 1120 {% endblock %}
1130 1121
1131 1122
1132 {##############################################################################} 1123 {##############################################################################}
1133 {% block has_instance %} 1124 {% block has_instance %}
1134 bool {{v8_class}}::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isola te) 1125 bool {{v8_class}}::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isola te)
1135 { 1126 {
1136 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 1127 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 {% endif %} 1326 {% endif %}
1336 } 1327 }
1337 1328
1338 template<> 1329 template<>
1339 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 1330 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
1340 { 1331 {
1341 return toV8(impl, creationContext, isolate); 1332 return toV8(impl, creationContext, isolate);
1342 } 1333 }
1343 1334
1344 {% endblock %} 1335 {% endblock %}
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8SVGTestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698