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

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

Issue 556893002: Move IdlType.may_raise_exception_on_conversion to v8_types.py (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/idl_types.py ('k') | Source/bindings/scripts/v8_interface.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 # 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 # [TypeChecking=Interface] 322 # [TypeChecking=Interface]
323 has_type_checking_interface = ( 323 has_type_checking_interface = (
324 (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or 324 (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or
325 has_extended_attribute_value(attribute, 'TypeChecking', 'Interface')) a nd 325 has_extended_attribute_value(attribute, 'TypeChecking', 'Interface')) a nd
326 idl_type.is_wrapper_type) 326 idl_type.is_wrapper_type)
327 327
328 context.update({ 328 context.update({
329 'has_setter_exception_state': 329 'has_setter_exception_state':
330 is_setter_raises_exception or has_type_checking_interface or 330 is_setter_raises_exception or has_type_checking_interface or
331 context['has_type_checking_unrestricted'] or 331 context['has_type_checking_unrestricted'] or
332 idl_type.may_raise_exception_on_conversion, 332 idl_type.v8_conversion_needs_exception_state,
333 'has_type_checking_interface': has_type_checking_interface, 333 'has_type_checking_interface': has_type_checking_interface,
334 'is_setter_call_with_execution_context': v8_utilities.has_extended_attri bute_value( 334 'is_setter_call_with_execution_context': v8_utilities.has_extended_attri bute_value(
335 attribute, 'SetterCallWith', 'ExecutionContext'), 335 attribute, 'SetterCallWith', 'ExecutionContext'),
336 'is_setter_raises_exception': is_setter_raises_exception, 336 'is_setter_raises_exception': is_setter_raises_exception,
337 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( 337 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
338 'cppValue', isolate='scriptState->isolate()', 338 'cppValue', isolate='scriptState->isolate()',
339 creation_context='scriptState->context()->Global()'), 339 creation_context='scriptState->context()->Global()'),
340 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( 340 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value(
341 extended_attributes, 'v8Value', 'cppValue'), 341 extended_attributes, 'v8Value', 'cppValue'),
342 }) 342 })
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 lambda self: strip_suffix(self.base_type, 'Constructor')) 495 lambda self: strip_suffix(self.base_type, 'Constructor'))
496 496
497 497
498 def is_constructor_attribute(attribute): 498 def is_constructor_attribute(attribute):
499 # FIXME: replace this with [ConstructorAttribute] extended attribute 499 # FIXME: replace this with [ConstructorAttribute] extended attribute
500 return attribute.idl_type.name.endswith('Constructor') 500 return attribute.idl_type.name.endswith('Constructor')
501 501
502 502
503 def constructor_getter_context(interface, attribute, context): 503 def constructor_getter_context(interface, attribute, context):
504 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 504 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW
« no previous file with comments | « Source/bindings/scripts/idl_types.py ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698