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

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

Issue 154133003: IDL compiler: sync Python to r166698 (and add test case) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | Source/bindings/tests/idls/TestInterfaceWillBeGarbageCollected.idl » ('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 891e7411845dee71e121a96f68204603f4b209bb..2871b643313b890265b5a8ecfa313c8137065d99 100644
--- a/Source/bindings/templates/interface.h
+++ b/Source/bindings/templates/interface.h
@@ -131,16 +131,20 @@ public:
{% endif %}
{# Custom internal fields #}
{% set custom_internal_field_counter = 0 %}
- {# persistentHandleIndex must be the first field, if it is present #}
- {% if is_will_be_garbage_collected %}
- static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
- {% set custom_internal_field_counter = custom_internal_field_counter + 1 %}
- {% endif %}
{% if is_event_target and not is_node %}
{# Event listeners on DOM nodes are explicitly supported in the GC controller. #}
static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
{% set custom_internal_field_counter = custom_internal_field_counter + 1 %}
{% endif %}
+ {# persistentHandleIndex must be the last field, if it is present.
+ Detailed explanation: https://codereview.chromium.org/139173012
+ 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 is_will_be_garbage_collected %}
+ 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}};
{# End custom internal fields #}
static inline void* toInternalPointer({{cpp_class}}* impl)
« no previous file with comments | « no previous file | Source/bindings/tests/idls/TestInterfaceWillBeGarbageCollected.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698