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

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/v8_interface.py

Issue 2296573003: binding: Reduces the binary size of binding's generated code. (Closed)
Patch Set: Created 4 years, 3 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 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # coding=utf-8 2 # coding=utf-8
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 method['is_check_security_for_receiver'] and not method['is_unforgea ble'] 556 method['is_check_security_for_receiver'] and not method['is_unforgea ble']
557 for method in methods), 557 for method in methods),
558 'has_private_script': (any(attribute['is_implemented_in_private_script'] for attribute in attributes) or 558 'has_private_script': (any(attribute['is_implemented_in_private_script'] for attribute in attributes) or
559 any(method['is_implemented_in_private_script'] fo r method in methods)), 559 any(method['is_implemented_in_private_script'] fo r method in methods)),
560 'iterator_method': iterator_method, 560 'iterator_method': iterator_method,
561 'has_array_iterator': has_array_iterator, 561 'has_array_iterator': has_array_iterator,
562 'methods': methods, 562 'methods': methods,
563 }) 563 })
564 564
565 # Conditionally enabled members 565 # Conditionally enabled members
566 has_conditional_attributes_on_instance = any(
567 (attribute['exposed_test'] or attribute['secure_context_test']) and attr ibute['on_instance']
568 for attribute in attributes)
569 has_conditional_attributes_on_prototype = any( 566 has_conditional_attributes_on_prototype = any(
570 (attribute['exposed_test'] or attribute['secure_context_test']) and attr ibute['on_prototype'] 567 (attribute['exposed_test'] or attribute['secure_context_test']) and attr ibute['on_prototype']
571 for attribute in attributes) 568 for attribute in attributes)
572 context.update({ 569 context.update({
573 'has_conditional_attributes_on_instance':
574 has_conditional_attributes_on_instance,
575 'has_conditional_attributes_on_prototype': 570 'has_conditional_attributes_on_prototype':
576 has_conditional_attributes_on_prototype, 571 has_conditional_attributes_on_prototype,
577 }) 572 })
578 573
579 context.update({ 574 context.update({
580 'indexed_property_getter': property_getter(interface.indexed_property_ge tter, ['index']), 575 'indexed_property_getter': property_getter(interface.indexed_property_ge tter, ['index']),
581 'indexed_property_setter': property_setter(interface.indexed_property_se tter, interface), 576 'indexed_property_setter': property_setter(interface.indexed_property_se tter, interface),
582 'indexed_property_deleter': property_deleter(interface.indexed_property_ deleter), 577 'indexed_property_deleter': property_deleter(interface.indexed_property_ deleter),
583 'is_override_builtins': 'OverrideBuiltins' in extended_attributes, 578 'is_override_builtins': 'OverrideBuiltins' in extended_attributes,
584 'named_property_getter': property_getter(interface.named_property_getter , ['propertyName']), 579 'named_property_getter': property_getter(interface.named_property_getter , ['propertyName']),
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 extended_attributes = deleter.extended_attributes 1401 extended_attributes = deleter.extended_attributes
1407 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1402 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1408 is_ce_reactions = 'CEReactions' in extended_attributes 1403 is_ce_reactions = 'CEReactions' in extended_attributes
1409 return { 1404 return {
1410 'is_call_with_script_state': is_call_with_script_state, 1405 'is_call_with_script_state': is_call_with_script_state,
1411 'is_ce_reactions': is_ce_reactions, 1406 'is_ce_reactions': is_ce_reactions,
1412 'is_custom': 'Custom' in extended_attributes, 1407 'is_custom': 'Custom' in extended_attributes,
1413 'is_raises_exception': 'RaisesException' in extended_attributes, 1408 'is_raises_exception': 'RaisesException' in extended_attributes,
1414 'name': cpp_name(deleter), 1409 'name': cpp_name(deleter),
1415 } 1410 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h ('k') | third_party/WebKit/Source/bindings/templates/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698