OLD | NEW |
1 {##############################################################################} | 1 {##############################################################################} |
2 {% macro generate_method(method, world_suffix) %} | 2 {% macro generate_method(method, world_suffix) %} |
3 {% filter conditional(method.conditional_string) %} | 3 {% filter conditional(method.conditional_string) %} |
4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
5 { | 5 { |
6 {# Local variables #} | 6 {# Local variables #} |
7 {% if method.has_exception_state %} | 7 {% if method.has_exception_state %} |
8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); | 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); |
9 {% endif %} | 9 {% endif %} |
10 {# Overloaded methods have length checked during overload resolution #} | 10 {# Overloaded methods have length checked during overload resolution #} |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 http://crbug.com/353484 #} | 290 http://crbug.com/353484 #} |
291 if (info.Length() >= 2 && listener && !impl->toNode()) | 291 if (info.Length() >= 2 && listener && !impl->toNode()) |
292 {{hidden_dependency_action}}(info.Holder(), info[1], {{v8_class}}::eventList
enerCacheIndex, info.GetIsolate()); | 292 {{hidden_dependency_action}}(info.Holder(), info[1], {{v8_class}}::eventList
enerCacheIndex, info.GetIsolate()); |
293 {% endif %} | 293 {% endif %} |
294 {% endmacro %} | 294 {% endmacro %} |
295 | 295 |
296 | 296 |
297 {######################################} | 297 {######################################} |
298 {% macro union_type_method_call_and_set_return_value(method) %} | 298 {% macro union_type_method_call_and_set_return_value(method) %} |
299 {% for argument in method.union_arguments %} | 299 {% for argument in method.union_arguments %} |
300 {{argument.cpp_type}} {{argument.cpp_value}}; | 300 {{argument.cpp_type}} {{argument.cpp_value}}{{argument.cpp_type_initializer}}; |
301 {% endfor %} | 301 {% endfor %} |
302 {{method.cpp_value}}; | 302 {{method.cpp_value}}; |
303 {% if method.is_null_expression %}{# used by getters #} | 303 {% if method.is_null_expression %}{# used by getters #} |
304 if ({{method.is_null_expression}}) | 304 if ({{method.is_null_expression}}) |
305 return; | 305 return; |
306 {% endif %} | 306 {% endif %} |
307 {% for argument in method.union_arguments %} | 307 {% for argument in method.union_arguments %} |
308 if ({{argument.null_check_value}}) { | 308 if ({{argument.null_check_value}}) { |
309 {{argument.v8_set_return_value}}; | 309 {{argument.v8_set_return_value}}; |
310 return; | 310 return; |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate
()); | 619 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate
()); |
620 {% else %} | 620 {% else %} |
621 {% set constructor_class = v8_class + ('Constructor' | 621 {% set constructor_class = v8_class + ('Constructor' |
622 if constructor.is_named_constructor else | 622 if constructor.is_named_constructor else |
623 '') %} | 623 '') %} |
624 v8::Handle<v8::Object> wrapper = info.Holder(); | 624 v8::Handle<v8::Object> wrapper = info.Holder(); |
625 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configurat
ion}}); | 625 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configurat
ion}}); |
626 {% endif %} | 626 {% endif %} |
627 v8SetReturnValue(info, wrapper); | 627 v8SetReturnValue(info, wrapper); |
628 {% endmacro %} | 628 {% endmacro %} |
OLD | NEW |