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

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

Issue 58963002: IDL compiler: [ActivityLogging] for methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 this_custom_signature = custom_signature(arguments) 47 this_custom_signature = custom_signature(arguments)
48 if this_custom_signature: 48 if this_custom_signature:
49 signature = name + 'Signature' 49 signature = name + 'Signature'
50 elif is_static: 50 elif is_static:
51 signature = 'v8::Local<v8::Signature>()' 51 signature = 'v8::Local<v8::Signature>()'
52 else: 52 else:
53 signature = 'defaultSignature' 53 signature = 'defaultSignature'
54 54
55 contents = { 55 contents = {
56 'activity_logging_world_list': v8_utilities.activity_logging_world_list( method, 'Access'), # [ActivityLogging]
haraken 2013/11/05 06:27:37 What is 'Access'? Shall we rename it to 'Method'?
Nils Barth (inactive) 2013/11/05 06:40:57 Agreed we should rename; will do in a followup; pl
haraken 2013/11/05 06:51:04 I'd prefer ForAllWorlds. BTW, is it possible to u
56 'arguments': [generate_argument(interface, method, argument, index) 57 'arguments': [generate_argument(interface, method, argument, index)
57 for index, argument in enumerate(arguments)], 58 for index, argument in enumerate(arguments)],
58 'cpp_method': cpp_method(interface, method, len(arguments)), 59 'cpp_method': cpp_method(interface, method, len(arguments)),
59 'custom_signature': this_custom_signature, 60 'custom_signature': this_custom_signature,
60 'idl_type': method.idl_type, 61 'idl_type': method.idl_type,
61 'is_static': is_static, 62 'is_static': is_static,
62 'name': name, 63 'name': name,
63 'number_of_required_arguments': len([ 64 'number_of_required_arguments': len([
64 argument for argument in arguments 65 argument for argument in arguments
65 if not (argument.is_optional or argument.is_variadic)]), 66 if not (argument.is_optional or argument.is_variadic)]),
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if argument.is_variadic: 137 if argument.is_variadic:
137 return 'V8TRYCATCH_VOID(Vector<{cpp_type}>, {name}, toNativeArguments<{c pp_type}>(info, {index}))'.format( 138 return 'V8TRYCATCH_VOID(Vector<{cpp_type}>, {name}, toNativeArguments<{c pp_type}>(info, {index}))'.format(
138 cpp_type=v8_types.cpp_type(idl_type), name=name, index=index) 139 cpp_type=v8_types.cpp_type(idl_type), name=name, index=index)
139 if (argument.is_optional and idl_type == 'DOMString' and 140 if (argument.is_optional and idl_type == 'DOMString' and
140 extended_attributes.get('Default') == 'NullString'): 141 extended_attributes.get('Default') == 'NullString'):
141 v8_value = 'argumentOrNull(info, %s)' % index 142 v8_value = 'argumentOrNull(info, %s)' % index
142 else: 143 else:
143 v8_value = 'info[%s]' % index 144 v8_value = 'info[%s]' % index
144 return v8_types.v8_value_to_local_cpp_value( 145 return v8_types.v8_value_to_local_cpp_value(
145 idl_type, argument.extended_attributes, v8_value, name, index=index) 146 idl_type, argument.extended_attributes, v8_value, name, index=index)
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/templates/interface_base.cpp » ('j') | Source/bindings/templates/interface_base.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698