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

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