OLD | NEW |
1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
2 #ifndef {{v8_class}}_h | 2 #ifndef {{v8_class}}_h |
3 #define {{v8_class}}_h | 3 #define {{v8_class}}_h |
4 | 4 |
5 {% for filename in header_includes %} | 5 {% for filename in header_includes %} |
6 #include "{{filename}}" | 6 #include "{{filename}}" |
7 {% endfor %} | 7 {% endfor %} |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun
t + {{custom_internal_field_counter}}; | 141 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun
t + {{custom_internal_field_counter}}; |
142 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} | 142 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} |
143 {% endif %} | 143 {% endif %} |
144 {# persistentHandleIndex must be the last field, if it is present. | 144 {# persistentHandleIndex must be the last field, if it is present. |
145 Detailed explanation: https://codereview.chromium.org/139173012 | 145 Detailed explanation: https://codereview.chromium.org/139173012 |
146 FIXME: Remove this internal field, and share one field for either: | 146 FIXME: Remove this internal field, and share one field for either: |
147 * a persistent handle (if the object is in oilpan) or | 147 * a persistent handle (if the object is in oilpan) or |
148 * a C++ pointer to the DOM object (if the object is not in oilpan) #} | 148 * a C++ pointer to the DOM object (if the object is not in oilpan) #} |
149 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; | 149 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; |
150 {# End custom internal fields #} | 150 {# End custom internal fields #} |
151 static void installConditionallyEnabledProperties(v8::Local<v8::Object>, v8:
:Isolate*){% if has_conditional_attributes %}; | 151 {% if has_conditional_attributes %} |
152 {% else %} { } | 152 static void installConditionallyEnabledProperties(v8::Local<v8::Object>, v8:
:Isolate*); |
153 {% endif %} | 153 {% endif %} |
154 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Con
text>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<
v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate
){% if unscopeables or has_conditional_attributes_on_prototype or conditionally_
enabled_methods %}; | 154 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Con
text>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<
v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate
){% if unscopeables or has_conditional_attributes_on_prototype or conditionally_
enabled_methods %}; |
155 {% else %} { } | 155 {% else %} { } |
156 {% endif %} | 156 {% endif %} |
157 {% if has_partial_interface %} | 157 {% if has_partial_interface %} |
158 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepa
rePrototypeAndInterfaceObjectFunction); | 158 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepa
rePrototypeAndInterfaceObjectFunction); |
159 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMW
rapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 159 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMW
rapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
160 {% for method in methods if method.overloads and method.overloads.has_partia
l_overloads %} | 160 {% for method in methods if method.overloads and method.overloads.has_partia
l_overloads %} |
161 {{exported}}static void register{{method.name | blink_capitalize}}MethodForP
artialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); | 161 {{exported}}static void register{{method.name | blink_capitalize}}MethodForP
artialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
162 {% endfor %} | 162 {% endfor %} |
(...skipping 10 matching lines...) Expand all Loading... |
173 | 173 |
174 {% endif %} | 174 {% endif %} |
175 template <> | 175 template <> |
176 struct V8TypeOf<{{cpp_class}}> { | 176 struct V8TypeOf<{{cpp_class}}> { |
177 typedef {{v8_class}} Type; | 177 typedef {{v8_class}} Type; |
178 }; | 178 }; |
179 | 179 |
180 } // namespace blink | 180 } // namespace blink |
181 | 181 |
182 #endif // {{v8_class}}_h | 182 #endif // {{v8_class}}_h |
OLD | NEW |