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

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

Issue 2714133003: bindings: Remove usages of restricted_float in the Python code. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 return { 364 return {
365 'assign_expression': 'toImplArguments<%s<%s>>(info, %s, exceptionState)' % (vector_type, this_cpp_type, index), 365 'assign_expression': 'toImplArguments<%s<%s>>(info, %s, exceptionState)' % (vector_type, this_cpp_type, index),
366 'check_expression': 'exceptionState.hadException()', 366 'check_expression': 'exceptionState.hadException()',
367 'cpp_type': this_cpp_type, 367 'cpp_type': this_cpp_type,
368 'cpp_name': argument.name, 368 'cpp_name': argument.name,
369 'declare_variable': False, 369 'declare_variable': False,
370 } 370 }
371 371
372 372
373 def v8_value_to_local_cpp_value(method, argument, index, return_promise=False, r estricted_float=False): 373 def v8_value_to_local_cpp_value(method, argument, index, return_promise=False):
374 extended_attributes = argument.extended_attributes 374 extended_attributes = argument.extended_attributes
375 idl_type = argument.idl_type 375 idl_type = argument.idl_type
376 name = argument.name 376 name = argument.name
377 if argument.is_variadic: 377 if argument.is_variadic:
378 return v8_value_to_local_cpp_variadic_value(method, argument, index, ret urn_promise) 378 return v8_value_to_local_cpp_variadic_value(method, argument, index, ret urn_promise)
379 return idl_type.v8_value_to_local_cpp_value(extended_attributes, 'info[%s]' % index, 379 return idl_type.v8_value_to_local_cpp_value(extended_attributes, 'info[%s]' % index,
380 name, index=index, declare_varia ble=False, 380 name, index=index, declare_varia ble=False,
381 use_exception_state=method.retur ns_promise, 381 use_exception_state=method.retur ns_promise)
382 restricted_float=restricted_floa t)
383 382
384 383
385 ################################################################################ 384 ################################################################################
386 # Auxiliary functions 385 # Auxiliary functions
387 ################################################################################ 386 ################################################################################
388 387
389 # [NotEnumerable], [Unforgeable] 388 # [NotEnumerable], [Unforgeable]
390 def property_attributes(interface, method): 389 def property_attributes(interface, method):
391 extended_attributes = method.extended_attributes 390 extended_attributes = method.extended_attributes
392 property_attributes_list = [] 391 property_attributes_list = []
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 return method.idl_type and method.idl_type.name == 'Promise' 446 return method.idl_type and method.idl_type.name == 'Promise'
448 447
449 IdlOperation.returns_promise = property(method_returns_promise) 448 IdlOperation.returns_promise = property(method_returns_promise)
450 449
451 450
452 def argument_conversion_needs_exception_state(method, argument): 451 def argument_conversion_needs_exception_state(method, argument):
453 idl_type = argument.idl_type 452 idl_type = argument.idl_type
454 return (idl_type.v8_conversion_needs_exception_state or 453 return (idl_type.v8_conversion_needs_exception_state or
455 argument.is_variadic or 454 argument.is_variadic or
456 (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 | « no previous file | third_party/WebKit/Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698