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

Side by Side Diff: Source/bindings/scripts/v8_types.py

Issue 331373002: Split bindings/v8/custom into core and modules. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if array_or_sequence_type: 323 if array_or_sequence_type:
324 return includes_for_type(array_or_sequence_type) 324 return includes_for_type(array_or_sequence_type)
325 325
326 # Simple types 326 # Simple types
327 base_idl_type = idl_type.base_type 327 base_idl_type = idl_type.base_type
328 if base_idl_type in INCLUDES_FOR_TYPE: 328 if base_idl_type in INCLUDES_FOR_TYPE:
329 return INCLUDES_FOR_TYPE[base_idl_type] 329 return INCLUDES_FOR_TYPE[base_idl_type]
330 if idl_type.is_basic_type: 330 if idl_type.is_basic_type:
331 return set() 331 return set()
332 if idl_type.is_typed_array_type: 332 if idl_type.is_typed_array_type:
333 return set(['bindings/v8/custom/V8%sCustom.h' % base_idl_type]) 333 return set(['bindings/core/v8/custom/V8%sCustom.h' % base_idl_type])
334 if base_idl_type.endswith('ConstructorConstructor'): 334 if base_idl_type.endswith('ConstructorConstructor'):
335 # FIXME: rename to NamedConstructor 335 # FIXME: rename to NamedConstructor
336 # FIXME: replace with a [NamedConstructorAttribute] extended attribute 336 # FIXME: replace with a [NamedConstructorAttribute] extended attribute
337 # Ending with 'ConstructorConstructor' indicates a named constructor, 337 # Ending with 'ConstructorConstructor' indicates a named constructor,
338 # and these do not have header files, as they are part of the generated 338 # and these do not have header files, as they are part of the generated
339 # bindings for the interface 339 # bindings for the interface
340 return set() 340 return set()
341 if base_idl_type.endswith('Constructor'): 341 if base_idl_type.endswith('Constructor'):
342 # FIXME: replace with a [ConstructorAttribute] extended attribute 342 # FIXME: replace with a [ConstructorAttribute] extended attribute
343 base_idl_type = idl_type.constructor_type_name 343 base_idl_type = idl_type.constructor_type_name
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 def cpp_value_to_v8_value(idl_type, cpp_value, isolate='info.GetIsolate()', crea tion_context='info.Holder()', extended_attributes=None): 687 def cpp_value_to_v8_value(idl_type, cpp_value, isolate='info.GetIsolate()', crea tion_context='info.Holder()', extended_attributes=None):
688 """Returns an expression that converts a C++ value to a V8 value.""" 688 """Returns an expression that converts a C++ value to a V8 value."""
689 # the isolate parameter is needed for callback interfaces 689 # the isolate parameter is needed for callback interfaces
690 idl_type, cpp_value = preprocess_idl_type_and_value(idl_type, cpp_value, ext ended_attributes) 690 idl_type, cpp_value = preprocess_idl_type_and_value(idl_type, cpp_value, ext ended_attributes)
691 this_v8_conversion_type = idl_type.v8_conversion_type(extended_attributes) 691 this_v8_conversion_type = idl_type.v8_conversion_type(extended_attributes)
692 format_string = CPP_VALUE_TO_V8_VALUE[this_v8_conversion_type] 692 format_string = CPP_VALUE_TO_V8_VALUE[this_v8_conversion_type]
693 statement = format_string.format(cpp_value=cpp_value, isolate=isolate, creat ion_context=creation_context) 693 statement = format_string.format(cpp_value=cpp_value, isolate=isolate, creat ion_context=creation_context)
694 return statement 694 return statement
695 695
696 IdlType.cpp_value_to_v8_value = cpp_value_to_v8_value 696 IdlType.cpp_value_to_v8_value = cpp_value_to_v8_value
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698