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

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

Issue 2573713002: [Bindings][Refactoring] Remove filters for origin trial features (Closed)
Patch Set: Rebase Created 4 years 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 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 79
80 def filter_method_configuration(methods, interface_is_partial): 80 def filter_method_configuration(methods, interface_is_partial):
81 return [method for method in methods if 81 return [method for method in methods if
82 method_is_visible(method, interface_is_partial) and 82 method_is_visible(method, interface_is_partial) and
83 not method['origin_trial_feature_name'] and 83 not method['origin_trial_feature_name'] and
84 not conditionally_exposed(method) and 84 not conditionally_exposed(method) and
85 not custom_registration(method)] 85 not custom_registration(method)]
86 86
87 87
88 def method_for_origin_trial_feature(methods, feature_name, interface_is_partial) :
89 """Filters the list of methods, and returns those defined for the named orig in trial feature."""
90 return [method for method in methods if
91 method_is_visible(method, interface_is_partial) and
92 method['origin_trial_feature_name'] == feature_name and
93 not conditionally_exposed(method) and
94 not custom_registration(method)]
95
96
97 def method_filters(): 88 def method_filters():
98 return {'conditionally_exposed': filter_conditionally_exposed, 89 return {'conditionally_exposed': filter_conditionally_exposed,
99 'custom_registration': filter_custom_registration, 90 'custom_registration': filter_custom_registration,
100 'has_method_configuration': filter_method_configuration, 91 'has_method_configuration': filter_method_configuration}
101 'method_for_origin_trial_feature': method_for_origin_trial_feature}
102 92
103 93
104 def use_local_result(method): 94 def use_local_result(method):
105 extended_attributes = method.extended_attributes 95 extended_attributes = method.extended_attributes
106 idl_type = method.idl_type 96 idl_type = method.idl_type
107 return (has_extended_attribute_value(method, 'CallWith', 'ScriptState') or 97 return (has_extended_attribute_value(method, 'CallWith', 'ScriptState') or
108 'NewObject' in extended_attributes or 98 'NewObject' in extended_attributes or
109 'RaisesException' in extended_attributes or 99 'RaisesException' in extended_attributes or
110 idl_type.is_union_type or 100 idl_type.is_union_type or
111 idl_type.is_explicit_nullable) 101 idl_type.is_explicit_nullable)
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 return method.idl_type and method.idl_type.name == 'Promise' 447 return method.idl_type and method.idl_type.name == 'Promise'
458 448
459 IdlOperation.returns_promise = property(method_returns_promise) 449 IdlOperation.returns_promise = property(method_returns_promise)
460 450
461 451
462 def argument_conversion_needs_exception_state(method, argument): 452 def argument_conversion_needs_exception_state(method, argument):
463 idl_type = argument.idl_type 453 idl_type = argument.idl_type
464 return (idl_type.v8_conversion_needs_exception_state or 454 return (idl_type.v8_conversion_needs_exception_state or
465 argument.is_variadic or 455 argument.is_variadic or
466 (method.returns_promise and idl_type.is_string_type)) 456 (method.returns_promise and idl_type.is_string_type))
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/v8_interface.py ('k') | third_party/WebKit/Source/bindings/scripts/v8_utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698