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

Side by Side 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, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceDocument.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #ifndef {{v8_class}}_h 7 #ifndef {{v8_class}}_h
8 #define {{v8_class}}_h 8 #define {{v8_class}}_h
9 9
10 {% filter conditional(conditional_string) %} 10 {% filter conditional(conditional_string) %}
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 {% endif %} 97 {% endif %}
98 {% if named_property_getter and 98 {% if named_property_getter and
99 named_property_getter.is_custom_property_enumerator %} 99 named_property_getter.is_custom_property_enumerator %}
100 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8: :Array>&); 100 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8: :Array>&);
101 {% endif %} 101 {% endif %}
102 {# END custom special operations #} 102 {# END custom special operations #}
103 {% if has_custom_legacy_call_as_function %} 103 {% if has_custom_legacy_call_as_function %}
104 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); 104 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&);
105 {% endif %} 105 {% endif %}
106 {# Custom internal fields #} 106 {# Custom internal fields #}
107 {% set custom_internal_field_counter = 0 %} 107 {% set custom_internal_field_counter = 0 %}
zerny-chromium 2014/06/03 09:20:19 This looks like the declaration of the field count
haraken 2014/06/03 09:29:55 Fixed the "+ 1 + 1" to "+ 2".
108 {% if is_event_target and not is_node %} 108 {% if is_event_target and not is_node %}
109 {# Event listeners on DOM nodes are explicitly supported in the GC controlle r. #} 109 {# Event listeners on DOM nodes are explicitly supported in the GC controlle r. #}
110 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun t + {{custom_internal_field_counter}}; 110 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun t + {{custom_internal_field_counter}};
111 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} 111 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %}
112 {% endif %} 112 {% endif %}
113 {# persistentHandleIndex must be the last field, if it is present. 113 {# persistentHandleIndex must be the last field, if it is present.
114 Detailed explanation: https://codereview.chromium.org/139173012 114 Detailed explanation: https://codereview.chromium.org/139173012
115 FIXME: Remove this internal field, and share one field for either: 115 FIXME: Remove this internal field, and share one field for either:
116 * a persistent handle (if the object is in oilpan) or 116 * a persistent handle (if the object is in oilpan) or
117 * a C++ pointer to the DOM object (if the object is not in oilpan) #} 117 * a C++ pointer to the DOM object (if the object is not in oilpan) #}
118 {% if not gc_type == 'RefCountedObject' %} 118 {% if gc_type == 'GarbageCollectedObject' %}
119 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; 119 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
120 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} 120 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}} + 1;
121 {% elif gc_type == 'WillBeGarbageCollectedObject' %}
122 #if ENABLE(OILPAN)
123 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
124 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}} + 1;
125 #else
126 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
127 #endif
128 {% else %}
129 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
121 {% endif %} 130 {% endif %}
122 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
123 {# End custom internal fields #} 131 {# End custom internal fields #}
124 static inline void* toInternalPointer({{cpp_class}}* impl) 132 static inline void* toInternalPointer({{cpp_class}}* impl)
125 { 133 {
126 {% if parent_interface %} 134 {% if parent_interface %}
127 return V8{{parent_interface}}::toInternalPointer(impl); 135 return V8{{parent_interface}}::toInternalPointer(impl);
128 {% else %} 136 {% else %}
129 return impl; 137 return impl;
130 {% endif %} 138 {% endif %}
131 } 139 }
132 140
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 285 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
278 } 286 }
279 287
280 {% if has_event_constructor %} 288 {% if has_event_constructor %}
281 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); 289 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = "");
282 290
283 {% endif %} 291 {% endif %}
284 } 292 }
285 {% endfilter %} 293 {% endfilter %}
286 #endif // {{v8_class}}_h 294 #endif // {{v8_class}}_h
OLDNEW
« 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