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

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

Issue 970843002: IDL: Implement float/double correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « Source/bindings/scripts/v8_dictionary.py ('k') | Source/bindings/scripts/v8_methods.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 # coding=utf-8 2 # coding=utf-8
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 } 1267 }
1268 1268
1269 1269
1270 def property_setter(setter, interface): 1270 def property_setter(setter, interface):
1271 if not setter: 1271 if not setter:
1272 return None 1272 return None
1273 1273
1274 idl_type = setter.arguments[1].idl_type 1274 idl_type = setter.arguments[1].idl_type
1275 extended_attributes = setter.extended_attributes 1275 extended_attributes = setter.extended_attributes
1276 is_raises_exception = 'RaisesException' in extended_attributes 1276 is_raises_exception = 'RaisesException' in extended_attributes
1277 restricted_float = ( 1277
1278 has_extended_attribute_value(interface, 'TypeChecking', 'Unrestricted') or
1279 has_extended_attribute_value(setter, 'TypeChecking', 'Unrestricted'))
1280 return { 1278 return {
1281 'has_exception_state': (is_raises_exception or 1279 'has_exception_state': (is_raises_exception or
1282 idl_type.v8_conversion_needs_exception_state), 1280 idl_type.v8_conversion_needs_exception_state),
1283 'has_type_checking_interface': 1281 'has_type_checking_interface':
1284 (has_extended_attribute_value(interface, 'TypeChecking', 'Interface' ) or 1282 (has_extended_attribute_value(interface, 'TypeChecking', 'Interface' ) or
1285 has_extended_attribute_value(setter, 'TypeChecking', 'Interface')) and 1283 has_extended_attribute_value(setter, 'TypeChecking', 'Interface')) and
1286 idl_type.is_wrapper_type, 1284 idl_type.is_wrapper_type,
1287 'idl_type': idl_type.base_type, 1285 'idl_type': idl_type.base_type,
1288 'is_custom': 'Custom' in extended_attributes, 1286 'is_custom': 'Custom' in extended_attributes,
1289 'is_nullable': idl_type.is_nullable, 1287 'is_nullable': idl_type.is_nullable,
1290 'is_raises_exception': is_raises_exception, 1288 'is_raises_exception': is_raises_exception,
1291 'name': cpp_name(setter), 1289 'name': cpp_name(setter),
1292 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( 1290 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value(
1293 extended_attributes, 'v8Value', 'propertyValue', restricted_float=re stricted_float), 1291 extended_attributes, 'v8Value', 'propertyValue'),
1294 } 1292 }
1295 1293
1296 1294
1297 def property_deleter(deleter): 1295 def property_deleter(deleter):
1298 if not deleter: 1296 if not deleter:
1299 return None 1297 return None
1300 1298
1301 idl_type = deleter.idl_type 1299 idl_type = deleter.idl_type
1302 extended_attributes = deleter.extended_attributes 1300 extended_attributes = deleter.extended_attributes
1303 return { 1301 return {
1304 'is_custom': 'Custom' in extended_attributes, 1302 'is_custom': 'Custom' in extended_attributes,
1305 'is_raises_exception': 'RaisesException' in extended_attributes, 1303 'is_raises_exception': 'RaisesException' in extended_attributes,
1306 'name': cpp_name(deleter), 1304 'name': cpp_name(deleter),
1307 } 1305 }
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_dictionary.py ('k') | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698