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

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

Issue 968033002: IDL: Support deleter operation with any return type (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 | « no previous file | no next file » | 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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( 1292 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value(
1293 extended_attributes, 'v8Value', 'propertyValue', restricted_float=re stricted_float), 1293 extended_attributes, 'v8Value', 'propertyValue', restricted_float=re stricted_float),
1294 } 1294 }
1295 1295
1296 1296
1297 def property_deleter(deleter): 1297 def property_deleter(deleter):
1298 if not deleter: 1298 if not deleter:
1299 return None 1299 return None
1300 1300
1301 idl_type = deleter.idl_type 1301 idl_type = deleter.idl_type
1302 if str(idl_type) != 'boolean':
1303 raise Exception(
1304 'Only deleters with boolean type are allowed, but type is "%s"' %
1305 idl_type)
1306 extended_attributes = deleter.extended_attributes 1302 extended_attributes = deleter.extended_attributes
1307 return { 1303 return {
1308 'is_custom': 'Custom' in extended_attributes, 1304 'is_custom': 'Custom' in extended_attributes,
1309 'is_raises_exception': 'RaisesException' in extended_attributes, 1305 'is_raises_exception': 'RaisesException' in extended_attributes,
1310 'name': cpp_name(deleter), 1306 'name': cpp_name(deleter),
1311 } 1307 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698