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

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

Issue 331593006: Decrease the binary size by 50 KB by outlining V8XXX::wrap() (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
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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 return wrapper; 1264 return wrapper;
1265 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); 1265 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate);
1266 if (world.isMainWorld()) { 1266 if (world.isMainWorld()) {
1267 if (LocalFrame* frame = impl->frame()) 1267 if (LocalFrame* frame = impl->frame())
1268 frame->script().windowShell(world)->updateDocumentWrapper(wrapper); 1268 frame->script().windowShell(world)->updateDocumentWrapper(wrapper);
1269 } 1269 }
1270 {% endif %} 1270 {% endif %}
1271 return wrapper; 1271 return wrapper;
1272 } 1272 }
1273 1273
1274 {% elif not has_custom_to_v8 and not has_custom_wrap %}
1275 v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creation Context, v8::Isolate* isolate)
1276 {
1277 ASSERT(impl);
1278 ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl, isolate));
1279 return {{v8_class}}::createWrapper(impl, creationContext, isolate);
1280 }
1281
1274 {% endif %} 1282 {% endif %}
1275 {% endblock %} 1283 {% endblock %}
1276 1284
1277 1285
1278 {##############################################################################} 1286 {##############################################################################}
1279 {% block create_wrapper %} 1287 {% block create_wrapper %}
1280 {% if not has_custom_to_v8 %} 1288 {% if not has_custom_to_v8 %}
1281 v8::Handle<v8::Object> {{v8_class}}::createWrapper({{pass_cpp_type}} impl, v8::H andle<v8::Object> creationContext, v8::Isolate* isolate) 1289 v8::Handle<v8::Object> {{v8_class}}::createWrapper({{pass_cpp_type}} impl, v8::H andle<v8::Object> creationContext, v8::Isolate* isolate)
1282 { 1290 {
1283 ASSERT(impl); 1291 ASSERT(impl);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 {% endif %} 1343 {% endif %}
1336 } 1344 }
1337 1345
1338 template<> 1346 template<>
1339 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 1347 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
1340 { 1348 {
1341 return toV8(impl, creationContext, isolate); 1349 return toV8(impl, creationContext, isolate);
1342 } 1350 }
1343 1351
1344 {% endblock %} 1352 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/tests/results/V8SVGTestInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698