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

Unified Diff: Source/bindings/scripts/unstable/v8_types.py

Issue 158663002: IDL compiler: sync Python to r166688 (and clean up special operations+union code) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Typo Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/unstable/v8_methods.py ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/unstable/v8_types.py
diff --git a/Source/bindings/scripts/unstable/v8_types.py b/Source/bindings/scripts/unstable/v8_types.py
index c95809552cfa71b7fd7a3ea96d181587f4f486c3..46351918e84c40feb752547b166e316360579c85 100644
--- a/Source/bindings/scripts/unstable/v8_types.py
+++ b/Source/bindings/scripts/unstable/v8_types.py
@@ -596,7 +596,12 @@ V8_SET_RETURN_VALUE = {
def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False):
- """Returns a statement that converts a C++ value to a V8 value and sets it as a return value."""
+ """Returns a statement that converts a C++ value to a V8 value and sets it as a return value.
+
+ release: for union types, can be either False (False for all member types)
+ or a sequence (list or tuple) of booleans (if specified
+ individually).
+ """
def dom_wrapper_conversion_type():
if not script_wrappable:
return 'DOMWrapperDefault'
@@ -610,7 +615,7 @@ def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wr
cpp_value + str(i),
extended_attributes,
script_wrappable,
- release[i])
+ release and release[i])
for i, union_member_type in
enumerate(idl_type.union_member_types)]
idl_type, cpp_value = preprocess_idl_type_and_value(idl_type, cpp_value, extended_attributes)
« no previous file with comments | « Source/bindings/scripts/unstable/v8_methods.py ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698