| OLD | NEW |
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
| 4 #ifndef {{v8_class}}_h | 4 #ifndef {{v8_class}}_h |
| 5 #define {{v8_class}}_h | 5 #define {{v8_class}}_h |
| 6 | 6 |
| 7 {% for filename in header_includes %} | 7 {% for filename in header_includes %} |
| 8 #include "{{filename}}" | 8 #include "{{filename}}" |
| 9 {% endfor %} | 9 {% endfor %} |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount
+ {{custom_internal_field_counter}}; | 122 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount
+ {{custom_internal_field_counter}}; |
| 123 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} | 123 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} |
| 124 {% endif %} | 124 {% endif %} |
| 125 {# persistentHandleIndex must be the last field, if it is present. | 125 {# persistentHandleIndex must be the last field, if it is present. |
| 126 Detailed explanation: https://codereview.chromium.org/139173012 | 126 Detailed explanation: https://codereview.chromium.org/139173012 |
| 127 FIXME: Remove this internal field, and share one field for either: | 127 FIXME: Remove this internal field, and share one field for either: |
| 128 * a persistent handle (if the object is in oilpan) or | 128 * a persistent handle (if the object is in oilpan) or |
| 129 * a C++ pointer to the DOM object (if the object is not in oilpan) #} | 129 * a C++ pointer to the DOM object (if the object is not in oilpan) #} |
| 130 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{c
ustom_internal_field_counter}}; | 130 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{c
ustom_internal_field_counter}}; |
| 131 {# End custom internal fields #} | 131 {# End custom internal fields #} |
| 132 {% if unscopables or has_conditional_attributes_on_prototype or | 132 {% if prepare_prototype_and_interface_object_func %} |
| 133 methods | conditionally_exposed(is_partial) %} | |
| 134 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 133 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
| 135 {% elif has_partial_interface %} | 134 {% elif has_partial_interface %} |
| 136 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
{} | 135 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
{} |
| 137 {% endif %} | 136 {% endif %} |
| 137 |
| 138 {% if has_partial_interface %} | 138 {% if has_partial_interface %} |
| 139 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Install
RuntimeEnabledFunction, PreparePrototypeAndInterfaceObjectFunction); | 139 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Install
RuntimeEnabledFunction, PreparePrototypeAndInterfaceObjectFunction); |
| 140 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra
pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 140 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra
pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
| 141 {% for method in methods if method.overloads and method.overloads.has_partial_
overloads %} | 141 {% for method in methods if method.overloads and method.overloads.has_partial_
overloads %} |
| 142 {{exported}}static void register{{method.name | blink_capitalize}}MethodForPar
tialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); | 142 {{exported}}static void register{{method.name | blink_capitalize}}MethodForPar
tialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| 143 {% endfor %} | 143 {% endfor %} |
| 144 {% endif %} | 144 {% endif %} |
| 145 | 145 |
| 146 {% for feature in origin_trial_features %} | 146 {% for feature in origin_trial_features %} |
| 147 | 147 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 template <> | 275 template <> |
| 276 struct V8TypeOf<{{cpp_class}}> { | 276 struct V8TypeOf<{{cpp_class}}> { |
| 277 typedef {{v8_class}} Type; | 277 typedef {{v8_class}} Type; |
| 278 }; | 278 }; |
| 279 | 279 |
| 280 } // namespace blink | 280 } // namespace blink |
| 281 | 281 |
| 282 #endif // {{v8_class}}_h | 282 #endif // {{v8_class}}_h |
| 283 | 283 |
| 284 {% endfilter %}{# format_blink_cpp_source_code #} | 284 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |