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

Unified Diff: Source/bindings/scripts/v8_union.py

Issue 689013002: IDL: Generate trace() method in union container types when required (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | Source/bindings/templates/union.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_union.py
diff --git a/Source/bindings/scripts/v8_union.py b/Source/bindings/scripts/v8_union.py
index fab726e59ebf04553547ce817cb35ad7512580e8..57e73b94f95c2b5e616ac9968bcf454f90421c43 100644
--- a/Source/bindings/scripts/v8_union.py
+++ b/Source/bindings/scripts/v8_union.py
@@ -65,6 +65,7 @@ def container_context(union_type, interfaces_info):
'dictionary_type': dictionary_type,
'interface_types': interface_types,
'members': members,
+ 'needs_trace': any(member['is_traceable'] for member in members),
'numeric_type': numeric_type,
'string_type': string_type,
}
@@ -83,6 +84,8 @@ def member_context(member, interfaces_info):
'cpp_value_to_v8_value': member.cpp_value_to_v8_value(
cpp_value='impl.getAs%s()' % member.name, isolate='isolate',
creation_context='creationContext'),
+ 'is_traceable': (member.is_garbage_collected or
sof 2014/10/31 07:30:12 Might be worth lifting out into a helper in v8_typ
Jens Widell 2014/10/31 07:48:46 Yes. I'll follow up with that.
+ member.is_will_be_garbage_collected),
'rvalue_cpp_type': member.cpp_type_args(used_as_rvalue_type=True),
'specific_type_enum': 'SpecificType' + member.name,
'type_name': member.name,
« no previous file with comments | « no previous file | Source/bindings/templates/union.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698