| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::A
rray>&); | 119 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::A
rray>&); |
| 120 {% endif %} | 120 {% endif %} |
| 121 {# END custom special operations #} | 121 {# END custom special operations #} |
| 122 {% if has_custom_legacy_call_as_function %} | 122 {% if has_custom_legacy_call_as_function %} |
| 123 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); | 123 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); |
| 124 {% endif %} | 124 {% endif %} |
| 125 {# Custom internal fields #} | 125 {# Custom internal fields #} |
| 126 {% set custom_internal_field_counter = 0 %} | 126 {% set custom_internal_field_counter = 0 %} |
| 127 {% if is_event_target and not is_node %} | 127 {% if is_event_target and not is_node %} |
| 128 {# Event listeners on DOM nodes are explicitly supported in the GC controller.
#} | 128 {# Event listeners on DOM nodes are explicitly supported in the GC controller.
#} |
| 129 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount
+ {{custom_internal_field_counter}}; | 129 static const int eventListenerCacheIndex = kV8DefaultWrapperInternalFieldCount
+ {{custom_internal_field_counter}}; |
| 130 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} | 130 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} |
| 131 {% endif %} | 131 {% endif %} |
| 132 {# persistentHandleIndex must be the last field, if it is present. | 132 {# persistentHandleIndex must be the last field, if it is present. |
| 133 Detailed explanation: https://codereview.chromium.org/139173012 | 133 Detailed explanation: https://codereview.chromium.org/139173012 |
| 134 FIXME: Remove this internal field, and share one field for either: | 134 FIXME: Remove this internal field, and share one field for either: |
| 135 * a persistent handle (if the object is in oilpan) or | 135 * a persistent handle (if the object is in oilpan) or |
| 136 * a C++ pointer to the DOM object (if the object is not in oilpan) #} | 136 * a C++ pointer to the DOM object (if the object is not in oilpan) #} |
| 137 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{c
ustom_internal_field_counter}}; | 137 static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + {{
custom_internal_field_counter}}; |
| 138 {# End custom internal fields #} | 138 {# End custom internal fields #} |
| 139 {% if unscopables or has_conditional_attributes_on_prototype or | 139 {% if unscopables or has_conditional_attributes_on_prototype or |
| 140 methods | conditionally_exposed(is_partial) %} | 140 methods | conditionally_exposed(is_partial) %} |
| 141 {{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); | 141 {{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); |
| 142 {% endif %} | 142 {% endif %} |
| 143 {% if has_partial_interface %} | 143 {% if has_partial_interface %} |
| 144 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepare
PrototypeAndInterfaceObjectFunction); | 144 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepare
PrototypeAndInterfaceObjectFunction); |
| 145 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra
pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 145 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra
pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
| 146 {% for method in methods if method.overloads and method.overloads.has_partial_
overloads %} | 146 {% for method in methods if method.overloads and method.overloads.has_partial_
overloads %} |
| 147 {{exported}}static void register{{method.name | blink_capitalize}}MethodForPar
tialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); | 147 {{exported}}static void register{{method.name | blink_capitalize}}MethodForPar
tialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 170 template <> | 170 template <> |
| 171 struct V8TypeOf<{{cpp_class}}> { | 171 struct V8TypeOf<{{cpp_class}}> { |
| 172 typedef {{v8_class}} Type; | 172 typedef {{v8_class}} Type; |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace blink | 175 } // namespace blink |
| 176 | 176 |
| 177 #endif // {{v8_class}}_h | 177 #endif // {{v8_class}}_h |
| 178 | 178 |
| 179 {% endfilter %}{# format_blink_cpp_source_code #} | 179 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |