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

Unified Diff: Source/bindings/templates/interface.h

Issue 314603003: Don't add extra 8 byte to DOM wrappers in non-oilpan builds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.h
diff --git a/Source/bindings/templates/interface.h b/Source/bindings/templates/interface.h
index 8440e13744e8d45d8d47d73fd035bbaf0c59a14c..d456b515d04c8fcf9672d435a8d26ec234c5afd2 100644
--- a/Source/bindings/templates/interface.h
+++ b/Source/bindings/templates/interface.h
@@ -115,11 +115,21 @@ 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 %}
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
+ {% elif gc_type == 'WillBeGarbageCollectedObject' %}
+#if ENABLE(OILPAN)
static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
{% set custom_internal_field_counter = custom_internal_field_counter + 1 %}
zerny-chromium 2014/06/03 09:35:23 It looks like this does not work because of phase
- {% endif %}
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
+#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)
{
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698