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

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

Issue 77453002: IDL compiler: [CheckSecurity=Frame] interface + [DoNotCheckSecurity] members (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 for method in interface.operations] 105 for method in interface.operations]
106 generate_overloads(methods) 106 generate_overloads(methods)
107 for method in methods: 107 for method in methods:
108 method['do_generate_method_configuration'] = ( 108 method['do_generate_method_configuration'] = (
109 method['do_not_check_signature'] and 109 method['do_not_check_signature'] and
110 not method['per_context_enabled_function_name'] and 110 not method['per_context_enabled_function_name'] and
111 # For overloaded methods, only generate one accessor 111 # For overloaded methods, only generate one accessor
112 ('overload_index' not in method or method['overload_index'] == 1)) 112 ('overload_index' not in method or method['overload_index'] == 1))
113 113
114 template_contents.update({ 114 template_contents.update({
115 'has_origin_safe_method_setter': any(
116 method['is_check_security_for_frame'] and not method['is_read_only']
117 for method in methods),
115 'has_method_configuration': any(method['do_generate_method_configuration '] for method in methods), 118 'has_method_configuration': any(method['do_generate_method_configuration '] for method in methods),
116 'has_per_context_enabled_methods': any(method['per_context_enabled_funct ion_name'] for method in methods), 119 'has_per_context_enabled_methods': any(method['per_context_enabled_funct ion_name'] for method in methods),
117 'methods': methods, 120 'methods': methods,
118 }) 121 })
119 122
120 return template_contents 123 return template_contents
121 124
122 125
123 # [DeprecateAs], [Reflect], [RuntimeEnabled] 126 # [DeprecateAs], [Reflect], [RuntimeEnabled]
124 def generate_constant(constant): 127 def generate_constant(constant):
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 '%s->IsString()' % cpp_value, 242 '%s->IsString()' % cpp_value,
240 '%s->IsObject()' % cpp_value]) 243 '%s->IsObject()' % cpp_value])
241 if v8_types.array_or_sequence_type(idl_type): 244 if v8_types.array_or_sequence_type(idl_type):
242 return '%s->IsArray()' % cpp_value 245 return '%s->IsArray()' % cpp_value
243 if v8_types.is_wrapper_type(idl_type): 246 if v8_types.is_wrapper_type(idl_type):
244 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(), worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value) 247 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(), worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value)
245 if argument['is_nullable']: 248 if argument['is_nullable']:
246 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check]) 249 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check])
247 return type_check 250 return type_check
248 return None 251 return None
OLDNEW
« no previous file with comments | « Source/bindings/scripts/unstable/v8_attributes.py ('k') | Source/bindings/scripts/unstable/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698