Index: Source/bindings/templates/interface.h |
diff --git a/Source/bindings/templates/interface.h b/Source/bindings/templates/interface.h |
index 8440e13744e8d45d8d47d73fd035bbaf0c59a14c..c58efd4562da9d0e1ef37779cc7a0fdc8abad554 100644 |
--- a/Source/bindings/templates/interface.h |
+++ b/Source/bindings/templates/interface.h |
@@ -115,11 +115,20 @@ public: |
FIXME: Remove this internal field, and share one field for either: |
* a persistent handle (if the object is in oilpan) or |
* a C++ pointer to the DOM object (if the object is not in oilpan) #} |
- {% if not gc_type == 'RefCountedObject' %} |
+ {% if gc_type == 'GarbageCollectedObject' %} |
static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; |
{% set custom_internal_field_counter = custom_internal_field_counter + 1 %} |
- {% endif %} |
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; |
zerny-chromium
2014/06/03 08:49:03
I find the side-effect above confusing, could we n
haraken
2014/06/03 08:55:41
That looks nicer. Done.
|
+ {% elif gc_type == 'WillBeGarbageCollectedObject' %} |
+#if ENABLE(OILPAN) |
+ static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; |
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}} + 1; |
+#else |
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; |
+#endif |
+ {% else %} |
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; |
+ {% endif %} |
{# End custom internal fields #} |
static inline void* toInternalPointer({{cpp_class}}* impl) |
{ |