OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 ]) | 50 ]) |
51 INTERFACE_CPP_INCLUDES = set([ | 51 INTERFACE_CPP_INCLUDES = set([ |
52 'RuntimeEnabledFeatures.h', | 52 'RuntimeEnabledFeatures.h', |
53 'bindings/v8/ExceptionMessages.h', | 53 'bindings/v8/ExceptionMessages.h', |
54 'bindings/v8/V8Binding.h', | 54 'bindings/v8/V8Binding.h', |
55 'bindings/v8/V8DOMConfiguration.h', # FIXME: necessary? | 55 'bindings/v8/V8DOMConfiguration.h', # FIXME: necessary? |
56 'bindings/v8/V8DOMWrapper.h', # FIXME: necessary? | 56 'bindings/v8/V8DOMWrapper.h', # FIXME: necessary? |
57 'core/dom/ContextFeatures.h', | 57 'core/dom/ContextFeatures.h', |
58 'core/dom/Document.h', | 58 'core/dom/Document.h', |
59 'platform/TraceEvent.h', | 59 'platform/TraceEvent.h', |
60 'wtf/UnusedParam.h', | |
61 ]) | 60 ]) |
62 | 61 |
63 | 62 |
64 def generate_interface(interface): | 63 def generate_interface(interface): |
65 includes.clear() | 64 includes.clear() |
66 includes.update(INTERFACE_CPP_INCLUDES) | 65 includes.update(INTERFACE_CPP_INCLUDES) |
67 extended_attributes = interface.extended_attributes | 66 extended_attributes = interface.extended_attributes |
68 | 67 |
69 # [CheckSecurity] | 68 # [CheckSecurity] |
70 is_check_security = 'CheckSecurity' in extended_attributes | 69 is_check_security = 'CheckSecurity' in extended_attributes |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 '%s->IsString()' % cpp_value, | 266 '%s->IsString()' % cpp_value, |
268 '%s->IsObject()' % cpp_value]) | 267 '%s->IsObject()' % cpp_value]) |
269 if v8_types.array_or_sequence_type(idl_type): | 268 if v8_types.array_or_sequence_type(idl_type): |
270 return '%s->IsArray()' % cpp_value | 269 return '%s->IsArray()' % cpp_value |
271 if v8_types.is_wrapper_type(idl_type): | 270 if v8_types.is_wrapper_type(idl_type): |
272 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(),
worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value) | 271 type_check = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate(),
worldType(info.GetIsolate()))'.format(idl_type=idl_type, cpp_value=cpp_value) |
273 if argument['is_nullable']: | 272 if argument['is_nullable']: |
274 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check]) | 273 type_check = ' || '.join(['%s->IsNull()' % cpp_value, type_check]) |
275 return type_check | 274 return type_check |
276 return None | 275 return None |
OLD | NEW |