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

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

Issue 1161463009: bindings: Supports [LenientThis] extended attributes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a layout test for [LenientThis]. Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/templates/attributes.cpp » ('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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 not is_do_not_check_security) 117 not is_do_not_check_security)
118 118
119 is_raises_exception = 'RaisesException' in extended_attributes 119 is_raises_exception = 'RaisesException' in extended_attributes
120 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca llEpilogue') 120 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca llEpilogue')
121 is_post_message = 'PostMessage' in extended_attributes 121 is_post_message = 'PostMessage' in extended_attributes
122 if is_post_message: 122 if is_post_message:
123 includes.add('bindings/core/v8/SerializedScriptValueFactory.h') 123 includes.add('bindings/core/v8/SerializedScriptValueFactory.h')
124 includes.add('core/dom/DOMArrayBuffer.h') 124 includes.add('core/dom/DOMArrayBuffer.h')
125 includes.add('core/dom/MessagePort.h') 125 includes.add('core/dom/MessagePort.h')
126 126
127 if 'LenientThis' in extended_attributes:
128 raise Exception('[LenientThis] is not supported for operations.')
127 129
128 return { 130 return {
129 'activity_logging_world_list': v8_utilities.activity_logging_world_list( method), # [ActivityLogging] 131 'activity_logging_world_list': v8_utilities.activity_logging_world_list( method), # [ActivityLogging]
130 'arguments': [argument_context(interface, method, argument, index, is_vi sible=is_visible) 132 'arguments': [argument_context(interface, method, argument, index, is_vi sible=is_visible)
131 for index, argument in enumerate(arguments)], 133 for index, argument in enumerate(arguments)],
132 'argument_declarations_for_private_script': 134 'argument_declarations_for_private_script':
133 argument_declarations_for_private_script(interface, method), 135 argument_declarations_for_private_script(interface, method),
134 'conditional_string': v8_utilities.conditional_string(method), 136 'conditional_string': v8_utilities.conditional_string(method),
135 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) 137 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type)
136 if idl_type.is_explicit_nullable else idl_type.cpp_type), 138 if idl_type.is_explicit_nullable else idl_type.cpp_type),
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 return method.idl_type and method.idl_type.name == 'Promise' 468 return method.idl_type and method.idl_type.name == 'Promise'
467 469
468 IdlOperation.returns_promise = property(method_returns_promise) 470 IdlOperation.returns_promise = property(method_returns_promise)
469 471
470 472
471 def argument_conversion_needs_exception_state(method, argument): 473 def argument_conversion_needs_exception_state(method, argument):
472 idl_type = argument.idl_type 474 idl_type = argument.idl_type
473 return (idl_type.v8_conversion_needs_exception_state or 475 return (idl_type.v8_conversion_needs_exception_state or
474 argument.is_variadic or 476 argument.is_variadic or
475 (method.returns_promise and idl_type.is_string_type)) 477 (method.returns_promise and idl_type.is_string_type))
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698