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

Side by Side Diff: Source/bindings/scripts/unstable/v8_methods.py

Issue 77453002: IDL compiler: [CheckSecurity=Frame] interface + [DoNotCheckSecurity] members (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Other extended attribute combinations Created 7 years, 1 month 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 # 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 'activity_logging_world_list': v8_utilities.activity_logging_world_list( method), # [ActivityLogging] 87 'activity_logging_world_list': v8_utilities.activity_logging_world_list( method), # [ActivityLogging]
88 'arguments': [generate_argument(interface, method, argument, index) 88 'arguments': [generate_argument(interface, method, argument, index)
89 for index, argument in enumerate(arguments)], 89 for index, argument in enumerate(arguments)],
90 'conditional_string': v8_utilities.conditional_string(method), 90 'conditional_string': v8_utilities.conditional_string(method),
91 'cpp_type': v8_types.cpp_type(idl_type), 91 'cpp_type': v8_types.cpp_type(idl_type),
92 'cpp_value': this_cpp_value, 92 'cpp_value': this_cpp_value,
93 'custom_signature': this_custom_signature, 93 'custom_signature': this_custom_signature,
94 'deprecate_as': v8_utilities.deprecate_as(method), # [DeprecateAs] 94 'deprecate_as': v8_utilities.deprecate_as(method), # [DeprecateAs]
95 'do_not_check_signature': not(this_custom_signature or is_static or 95 'do_not_check_signature': not(this_custom_signature or is_static or
96 v8_utilities.has_extended_attribute(method, 96 v8_utilities.has_extended_attribute(method,
97 ['DoNotCheckSignature', 'NotEnumerable', 'ReadOnly', 97 ['DoNotCheckSecurity', 'DoNotCheckSignature', 'NotEnumerable',
98 'RuntimeEnabled', 'Unforgeable'])), 98 'ReadOnly', 'RuntimeEnabled', 'Unforgeable'])),
99 'function_template': function_template(), 99 'function_template': function_template(),
100 'idl_type': idl_type, 100 'idl_type': idl_type,
101 'is_call_with_execution_context': has_extended_attribute_value(method, ' CallWith', 'ExecutionContext'), 101 'is_call_with_execution_context': has_extended_attribute_value(method, ' CallWith', 'ExecutionContext'),
102 'is_call_with_script_arguments': is_call_with_script_arguments, 102 'is_call_with_script_arguments': is_call_with_script_arguments,
103 'is_call_with_script_state': is_call_with_script_state, 103 'is_call_with_script_state': is_call_with_script_state,
104 'is_check_security_for_frame': ( 104 'is_check_security_for_frame': (
105 'CheckSecurity' in interface.extended_attributes and 105 'CheckSecurity' in interface.extended_attributes and
106 'DoNotCheckSecurity' not in extended_attributes), 106 'DoNotCheckSecurity' not in extended_attributes),
107 'is_check_security_for_node': is_check_security_for_node, 107 'is_check_security_for_node': is_check_security_for_node,
108 'is_custom': 'Custom' in extended_attributes, 108 'is_custom': 'Custom' in extended_attributes,
109 'is_custom_element_callbacks': is_custom_element_callbacks, 109 'is_custom_element_callbacks': is_custom_element_callbacks,
110 'is_do_not_check_security': 'DoNotCheckSecurity' in extended_attributes,
110 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, 111 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
111 'is_raises_exception': is_raises_exception, 112 'is_raises_exception': is_raises_exception,
113 'is_read_only': 'ReadOnly' in extended_attributes,
112 'is_static': is_static, 114 'is_static': is_static,
113 'is_strict_type_checking': 'StrictTypeChecking' in extended_attributes, 115 'is_strict_type_checking': 'StrictTypeChecking' in extended_attributes,
114 'is_variadic': arguments and arguments[-1].is_variadic, 116 'is_variadic': arguments and arguments[-1].is_variadic,
115 'measure_as': v8_utilities.measure_as(method), # [MeasureAs] 117 'measure_as': v8_utilities.measure_as(method), # [MeasureAs]
116 'name': name, 118 'name': name,
117 'number_of_arguments': len(arguments), 119 'number_of_arguments': len(arguments),
118 'number_of_required_arguments': len([ 120 'number_of_required_arguments': len([
119 argument for argument in arguments 121 argument for argument in arguments
120 if not (argument.is_optional or argument.is_variadic)]), 122 if not (argument.is_optional or argument.is_variadic)]),
121 'number_of_required_or_variadic_arguments': len([ 123 'number_of_required_or_variadic_arguments': len([
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return 'V8TRYCATCH_VOID(Vector<{cpp_type}>, {name}, toNativeArguments<{c pp_type}>(info, {index}))'.format( 227 return 'V8TRYCATCH_VOID(Vector<{cpp_type}>, {name}, toNativeArguments<{c pp_type}>(info, {index}))'.format(
226 cpp_type=v8_types.cpp_type(idl_type), name=name, index=index) 228 cpp_type=v8_types.cpp_type(idl_type), name=name, index=index)
227 # [Default=NullString] 229 # [Default=NullString]
228 if (argument.is_optional and idl_type == 'DOMString' and 230 if (argument.is_optional and idl_type == 'DOMString' and
229 extended_attributes.get('Default') == 'NullString'): 231 extended_attributes.get('Default') == 'NullString'):
230 v8_value = 'argumentOrNull(info, %s)' % index 232 v8_value = 'argumentOrNull(info, %s)' % index
231 else: 233 else:
232 v8_value = 'info[%s]' % index 234 v8_value = 'info[%s]' % index
233 return v8_types.v8_value_to_local_cpp_value( 235 return v8_types.v8_value_to_local_cpp_value(
234 idl_type, argument.extended_attributes, v8_value, name, index=index) 236 idl_type, argument.extended_attributes, v8_value, name, index=index)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698