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

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

Issue 2857143005: Gather serialization-related code into a directory. (Closed)
Patch Set: Created 3 years, 7 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
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 includes.add('core/dom/custom/CEReactionsScope.h') 137 includes.add('core/dom/custom/CEReactionsScope.h')
138 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute s 138 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute s
139 if is_custom_element_callbacks: 139 if is_custom_element_callbacks:
140 includes.add('core/dom/custom/V0CustomElementProcessingStack.h') 140 includes.add('core/dom/custom/V0CustomElementProcessingStack.h')
141 141
142 is_raises_exception = 'RaisesException' in extended_attributes 142 is_raises_exception = 'RaisesException' in extended_attributes
143 is_custom_call_prologue = has_extended_attribute_value(method, 'Custom', 'Ca llPrologue') 143 is_custom_call_prologue = has_extended_attribute_value(method, 'Custom', 'Ca llPrologue')
144 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca llEpilogue') 144 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca llEpilogue')
145 is_post_message = 'PostMessage' in extended_attributes 145 is_post_message = 'PostMessage' in extended_attributes
146 if is_post_message: 146 if is_post_message:
147 includes.add('bindings/core/v8/SerializedScriptValueFactory.h') 147 includes.add('bindings/core/v8/serialization/SerializedScriptValueFactor y.h')
148 includes.add('bindings/core/v8/Transferables.h') 148 includes.add('bindings/core/v8/serialization/Transferables.h')
149 includes.add('core/dom/DOMArrayBufferBase.h') 149 includes.add('core/dom/DOMArrayBufferBase.h')
150 includes.add('core/frame/ImageBitmap.h') 150 includes.add('core/frame/ImageBitmap.h')
151 151
152 if 'LenientThis' in extended_attributes: 152 if 'LenientThis' in extended_attributes:
153 raise Exception('[LenientThis] is not supported for operations.') 153 raise Exception('[LenientThis] is not supported for operations.')
154 154
155 argument_contexts = [ 155 argument_contexts = [
156 argument_context(interface, method, argument, index, is_visible=is_visib le) 156 argument_context(interface, method, argument, index, is_visible=is_visib le)
157 for index, argument in enumerate(arguments)] 157 for index, argument in enumerate(arguments)]
158 158
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 return method.idl_type and method.idl_type.name == 'Promise' 446 return method.idl_type and method.idl_type.name == 'Promise'
447 447
448 IdlOperation.returns_promise = property(method_returns_promise) 448 IdlOperation.returns_promise = property(method_returns_promise)
449 449
450 450
451 def argument_conversion_needs_exception_state(method, argument): 451 def argument_conversion_needs_exception_state(method, argument):
452 idl_type = argument.idl_type 452 idl_type = argument.idl_type
453 return (idl_type.v8_conversion_needs_exception_state or 453 return (idl_type.v8_conversion_needs_exception_state or
454 argument.is_variadic or 454 argument.is_variadic or
455 (method.returns_promise and idl_type.is_string_type)) 455 (method.returns_promise and idl_type.is_string_type))
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/modules/v8/v8.gni ('k') | third_party/WebKit/Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698