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

Side by Side Diff: sky/engine/bindings/scripts/v8_methods.py

Issue 683593002: Remove GarbageCollected support from the bindings (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/bindings/scripts/v8_interface.py ('k') | sky/engine/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 'is_optional': argument.is_optional, 252 'is_optional': argument.is_optional,
253 'is_variadic_wrapper_type': is_variadic_wrapper_type, 253 'is_variadic_wrapper_type': is_variadic_wrapper_type,
254 'is_wrapper_type': idl_type.is_wrapper_type, 254 'is_wrapper_type': idl_type.is_wrapper_type,
255 'name': argument.name, 255 'name': argument.name,
256 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( 256 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
257 argument.name, isolate='scriptState->isolate()', 257 argument.name, isolate='scriptState->isolate()',
258 creation_context='scriptState->context()->Global()'), 258 creation_context='scriptState->context()->Global()'),
259 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), 259 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value),
260 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True), 260 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True),
261 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind ex, return_promise=return_promise), 261 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind ex, return_promise=return_promise),
262 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc _type), 262 'vector_type': 'Vector',
263 } 263 }
264 264
265 265
266 def argument_declarations_for_private_script(interface, method): 266 def argument_declarations_for_private_script(interface, method):
267 argument_declarations = ['LocalFrame* frame'] 267 argument_declarations = ['LocalFrame* frame']
268 argument_declarations.append('%s* holderImpl' % interface.name) 268 argument_declarations.append('%s* holderImpl' % interface.name)
269 argument_declarations.extend(['%s %s' % (argument.idl_type.cpp_type_args( 269 argument_declarations.extend(['%s %s' % (argument.idl_type.cpp_type_args(
270 used_as_rvalue_type=True), argument.name) for argument in method.argumen ts]) 270 used_as_rvalue_type=True), argument.name) for argument in method.argumen ts])
271 if method.idl_type.name != 'void': 271 if method.idl_type.name != 'void':
272 argument_declarations.append('%s* %s' % (method.idl_type.cpp_type, 'resu lt')) 272 argument_declarations.append('%s* %s' % (method.idl_type.cpp_type, 'resu lt'))
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 if argument.idl_type.is_dictionary: 448 if argument.idl_type.is_dictionary:
449 # We always create impl objects for IDL dictionaries. 449 # We always create impl objects for IDL dictionaries.
450 return '%s::create()' % argument.idl_type.base_type 450 return '%s::create()' % argument.idl_type.base_type
451 if not argument.default_value: 451 if not argument.default_value:
452 return None 452 return None
453 return argument.idl_type.literal_cpp_value(argument.default_value) 453 return argument.idl_type.literal_cpp_value(argument.default_value)
454 454
455 IdlTypeBase.union_arguments = None 455 IdlTypeBase.union_arguments = None
456 IdlUnionType.union_arguments = property(union_arguments) 456 IdlUnionType.union_arguments = property(union_arguments)
457 IdlArgument.default_cpp_value = property(argument_default_cpp_value) 457 IdlArgument.default_cpp_value = property(argument_default_cpp_value)
OLDNEW
« no previous file with comments | « sky/engine/bindings/scripts/v8_interface.py ('k') | sky/engine/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698