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

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: Synced to fixes 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 for method in interface.operations] 102 for method in interface.operations]
103 generate_overloads(methods) 103 generate_overloads(methods)
104 for method in methods: 104 for method in methods:
105 method['do_generate_method_configuration'] = ( 105 method['do_generate_method_configuration'] = (
106 method['do_not_check_signature'] and 106 method['do_not_check_signature'] and
107 not method['per_context_enabled_function_name'] and 107 not method['per_context_enabled_function_name'] and
108 # For overloaded methods, only generate one accessor 108 # For overloaded methods, only generate one accessor
109 ('overload_index' not in method or method['overload_index'] == 1)) 109 ('overload_index' not in method or method['overload_index'] == 1))
110 110
111 template_contents.update({ 111 template_contents.update({
112 'has_domain_safe_method_setter': any(
haraken 2013/11/21 10:13:05 has_domain_safe_method_setter => has_origin_safe_m
Nils Barth (inactive) 2013/11/22 03:17:52 fixed passim
113 method['is_check_security_for_frame'] and not method['is_read_only']
114 for method in methods),
112 'has_method_configuration': any(method['do_generate_method_configuration '] for method in methods), 115 'has_method_configuration': any(method['do_generate_method_configuration '] for method in methods),
113 'has_per_context_enabled_methods': any(method['per_context_enabled_funct ion_name'] for method in methods), 116 'has_per_context_enabled_methods': any(method['per_context_enabled_funct ion_name'] for method in methods),
114 'methods': methods, 117 'methods': methods,
115 }) 118 })
116 119
117 return template_contents 120 return template_contents
118 121
119 122
120 # [DeprecateAs], [Reflect], [RuntimeEnabled] 123 # [DeprecateAs], [Reflect], [RuntimeEnabled]
121 def generate_constant(constant): 124 def generate_constant(constant):
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 '%s->IsString()' % cpp_value, 239 '%s->IsString()' % cpp_value,
237 '%s->IsObject()' % cpp_value]) 240 '%s->IsObject()' % cpp_value])
238 if v8_types.array_or_sequence_type(idl_type): 241 if v8_types.array_or_sequence_type(idl_type):
239 return '%s->IsArray()' % cpp_value 242 return '%s->IsArray()' % cpp_value
240 if v8_types.is_wrapper_type(idl_type): 243 if v8_types.is_wrapper_type(idl_type):
241 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(), worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value) 244 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(), worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value)
242 if argument['is_nullable']: 245 if argument['is_nullable']:
243 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check]) 246 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check])
244 return type_check 247 return type_check
245 return None 248 return None
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698