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

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

Issue 470063003: IDL: Use IdlArrayOrSequenceType for array/sequence IDL types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-extend-IdlTypeBase
Patch Set: Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generate template contexts of dictionaries for both v8 bindings and 5 """Generate template contexts of dictionaries for both v8 bindings and
6 implementation classes that are used by blink's core/modules. 6 implementation classes that are used by blink's core/modules.
7 """ 7 """
8 8
9 import copy 9 import copy
10 import operator 10 import operator
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 'cpp_default_value': cpp_default_value, 76 'cpp_default_value': cpp_default_value,
77 'cpp_type': idl_type.cpp_type, 77 'cpp_type': idl_type.cpp_type,
78 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( 78 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
79 cpp_value='impl->%s()' % member.name, isolate='isolate', 79 cpp_value='impl->%s()' % member.name, isolate='isolate',
80 creation_context='creationContext', 80 creation_context='creationContext',
81 extended_attributes=member.extended_attributes), 81 extended_attributes=member.extended_attributes),
82 'has_method_name': has_method_name_for_dictionary_member(member), 82 'has_method_name': has_method_name_for_dictionary_member(member),
83 'name': member.name, 83 'name': member.name,
84 'setter_name': setter_name_for_dictionary_member(member), 84 'setter_name': setter_name_for_dictionary_member(member),
85 'v8_default_value': v8_default_value, 85 'v8_default_value': v8_default_value,
86 'v8_type': v8_types.v8_type(idl_type.base_type), 86 'v8_type': (v8_types.v8_type(idl_type.base_type)
Nils Barth (inactive) 2014/08/14 14:24:44 Now, if this were a property on IdlType(Base) ...
87 if idl_type.is_interface_type else None),
haraken 2014/08/14 14:48:58 Just help me understand: Why do we want to set Non
Jens Widell 2014/08/14 15:02:55 The very useful v8_types.v8_type() function takes
Jens Widell 2014/08/14 15:22:03 Actually, this 'v8_type' doesn't appear to be used
Nils Barth (inactive) 2014/08/14 16:18:55 v8_type() is a Perl legacy; I kept it around as "m
87 } 88 }
88 89
89 90
90 # Context for implementation classes 91 # Context for implementation classes
91 92
92 def dictionary_impl_context(dictionary, interfaces_info): 93 def dictionary_impl_context(dictionary, interfaces_info):
93 includes.clear() 94 includes.clear()
94 header_includes = set(['platform/heap/Handle.h']) 95 header_includes = set(['platform/heap/Handle.h'])
95 return { 96 return {
96 'header_includes': header_includes, 97 'header_includes': header_includes,
(...skipping 30 matching lines...) Expand all
127 'getter_expression': getter_expression(), 128 'getter_expression': getter_expression(),
128 'has_method_expression': has_method_expression(), 129 'has_method_expression': has_method_expression(),
129 'has_method_name': has_method_name_for_dictionary_member(member), 130 'has_method_name': has_method_name_for_dictionary_member(member),
130 'is_traceable': (idl_type.is_garbage_collected or 131 'is_traceable': (idl_type.is_garbage_collected or
131 idl_type.is_will_be_garbage_collected), 132 idl_type.is_will_be_garbage_collected),
132 'member_cpp_type': member_cpp_type(), 133 'member_cpp_type': member_cpp_type(),
133 'name': member.name, 134 'name': member.name,
134 'rvalue_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), 135 'rvalue_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
135 'setter_name': setter_name_for_dictionary_member(member), 136 'setter_name': setter_name_for_dictionary_member(member),
136 } 137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698