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

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

Issue 2848243004: Clean up bindings/core/v8 (Part 2) (Closed)
Patch Set: Rebase Created 3 years, 7 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 # 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 this_cpp_value = cpp_value(interface, method, len(arguments)) 114 this_cpp_value = cpp_value(interface, method, len(arguments))
115 115
116 is_call_with_script_arguments = has_extended_attribute_value(method, 'CallWi th', 'ScriptArguments') 116 is_call_with_script_arguments = has_extended_attribute_value(method, 'CallWi th', 'ScriptArguments')
117 if is_call_with_script_arguments: 117 if is_call_with_script_arguments:
118 includes.update(['bindings/core/v8/ScriptCallStack.h', 118 includes.update(['bindings/core/v8/ScriptCallStack.h',
119 'core/inspector/ScriptArguments.h']) 119 'core/inspector/ScriptArguments.h'])
120 is_call_with_script_state = has_extended_attribute_value(method, 'CallWith', 'ScriptState') 120 is_call_with_script_state = has_extended_attribute_value(method, 'CallWith', 'ScriptState')
121 is_call_with_this_value = has_extended_attribute_value(method, 'CallWith', ' ThisValue') 121 is_call_with_this_value = has_extended_attribute_value(method, 'CallWith', ' ThisValue')
122 if is_call_with_script_state or is_call_with_this_value: 122 if is_call_with_script_state or is_call_with_this_value:
123 includes.add('bindings/core/v8/ScriptState.h') 123 includes.add('platform/bindings/ScriptState.h')
124 124
125 # [CheckSecurity] 125 # [CheckSecurity]
126 is_cross_origin = 'CrossOrigin' in extended_attributes 126 is_cross_origin = 'CrossOrigin' in extended_attributes
127 is_check_security_for_receiver = ( 127 is_check_security_for_receiver = (
128 has_extended_attribute_value(interface, 'CheckSecurity', 'Receiver') and 128 has_extended_attribute_value(interface, 'CheckSecurity', 'Receiver') and
129 not is_cross_origin) 129 not is_cross_origin)
130 is_check_security_for_return_value = ( 130 is_check_security_for_return_value = (
131 has_extended_attribute_value(method, 'CheckSecurity', 'ReturnValue')) 131 has_extended_attribute_value(method, 'CheckSecurity', 'ReturnValue'))
132 if is_check_security_for_receiver or is_check_security_for_return_value: 132 if is_check_security_for_receiver or is_check_security_for_return_value:
133 includes.add('bindings/core/v8/BindingSecurity.h') 133 includes.add('bindings/core/v8/BindingSecurity.h')
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 return method.idl_type and method.idl_type.name == 'Promise' 446 return method.idl_type and method.idl_type.name == 'Promise'
447 447
448 IdlOperation.returns_promise = property(method_returns_promise) 448 IdlOperation.returns_promise = property(method_returns_promise)
449 449
450 450
451 def argument_conversion_needs_exception_state(method, argument): 451 def argument_conversion_needs_exception_state(method, argument):
452 idl_type = argument.idl_type 452 idl_type = argument.idl_type
453 return (idl_type.v8_conversion_needs_exception_state or 453 return (idl_type.v8_conversion_needs_exception_state or
454 argument.is_variadic or 454 argument.is_variadic or
455 (method.returns_promise and idl_type.is_string_type)) 455 (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