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

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

Issue 134683007: IDL compiler: sync Python to r166680 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Order 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_interface.py ('k') | Source/bindings/templates/interface.h » ('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 46351918e84c40feb752547b166e316360579c85..2137e9c742fc243668c27f45f3a25d716fe5be02 100644
--- a/Source/bindings/scripts/unstable/v8_types.py
+++ b/Source/bindings/scripts/unstable/v8_types.py
@@ -289,7 +289,7 @@ def cpp_type(idl_type, extended_attributes=None, used_as_argument=False):
implemented_as_class = implemented_as(idl_type)
if used_as_argument:
return implemented_as_class + '*'
- if is_garbage_collected(idl_type):
+ if is_will_be_garbage_collected(idl_type):
return cpp_template_type('RefPtrWillBeRawPtr', implemented_as_class)
return cpp_template_type('RefPtr', implemented_as_class)
# Default, assume native type is a pointer with same type name as idl type
@@ -309,18 +309,6 @@ def v8_type(interface_type):
return 'V8' + interface_type
-# [GarbageCollected]
-garbage_collected_types = set()
-
-
-def is_garbage_collected(idl_type):
- return idl_type in garbage_collected_types
-
-
-def set_garbage_collected_types(new_garbage_collected_types):
- garbage_collected_types.update(new_garbage_collected_types)
-
-
# [ImplementedAs]
# This handles [ImplementedAs] on interface types, not [ImplementedAs] in the
# interface being generated. e.g., given:
@@ -342,6 +330,18 @@ def set_implemented_as_interfaces(new_implemented_as_interfaces):
implemented_as_interfaces.update(new_implemented_as_interfaces)
+# [WillBeGarbageCollected]
+will_be_garbage_collected_types = set()
+
+
+def is_will_be_garbage_collected(idl_type):
+ return idl_type in will_be_garbage_collected_types
+
+
+def set_will_be_garbage_collected_types(new_will_be_garbage_collected_types):
+ will_be_garbage_collected_types.update(new_will_be_garbage_collected_types)
+
+
################################################################################
# Includes
################################################################################
« no previous file with comments | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/templates/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698