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

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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %}
121 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
122 {% elif gc_type == 'WillBeGarbageCollectedObject' %}
123 #if ENABLE(OILPAN)
124 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
125 {% 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
126 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
127 #else
128 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
129 #endif
130 {% else %}
131 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
121 {% endif %} 132 {% endif %}
122 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + { {custom_internal_field_counter}};
123 {# End custom internal fields #} 133 {# End custom internal fields #}
124 static inline void* toInternalPointer({{cpp_class}}* impl) 134 static inline void* toInternalPointer({{cpp_class}}* impl)
125 { 135 {
126 {% if parent_interface %} 136 {% if parent_interface %}
127 return V8{{parent_interface}}::toInternalPointer(impl); 137 return V8{{parent_interface}}::toInternalPointer(impl);
128 {% else %} 138 {% else %}
129 return impl; 139 return impl;
130 {% endif %} 140 {% endif %}
131 } 141 }
132 142
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 287 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
278 } 288 }
279 289
280 {% if has_event_constructor %} 290 {% if has_event_constructor %}
281 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); 291 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = "");
282 292
283 {% endif %} 293 {% endif %}
284 } 294 }
285 {% endfilter %} 295 {% endfilter %}
286 #endif // {{v8_class}}_h 296 #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