| 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 cpp_type in method.cpp_type %} | 299 {% for cpp_type in method.cpp_type %} |
| 300 bool result{{loop.index0}}Enabled = false; | |
| 301 {{cpp_type}} result{{loop.index0}}; | 300 {{cpp_type}} result{{loop.index0}}; |
| 302 {% endfor %} | 301 {% endfor %} |
| 303 {{method.cpp_value}}; | 302 {{method.cpp_value}}; |
| 304 {% if method.is_null_expression %}{# used by getters #} | 303 {% if method.is_null_expression %}{# used by getters #} |
| 305 if ({{method.is_null_expression}}) | 304 if ({{method.is_null_expression}}) |
| 306 return; | 305 return; |
| 307 {% endif %} | 306 {% endif %} |
| 308 {% for v8_set_return_value in method.v8_set_return_value %} | 307 {% for v8_set_return_value in method.v8_set_return_value %} |
| 309 if (result{{loop.index0}}Enabled) { | 308 if (!result{{loop.index0}}.isNull()) { |
| 310 {{v8_set_return_value}}; | 309 {{v8_set_return_value}}; |
| 311 return; | 310 return; |
| 312 } | 311 } |
| 313 {% endfor %} | 312 {% endfor %} |
| 314 {# Fall back to null if none of the union members results are returned #} | 313 {# Fall back to null if none of the union members results are returned #} |
| 315 v8SetReturnValueNull(info); | 314 v8SetReturnValueNull(info); |
| 316 {% endmacro %} | 315 {% endmacro %} |
| 317 | 316 |
| 318 | 317 |
| 319 {######################################} | 318 {######################################} |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate
()); | 615 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate
()); |
| 617 {% else %} | 616 {% else %} |
| 618 {% set constructor_class = v8_class + ('Constructor' | 617 {% set constructor_class = v8_class + ('Constructor' |
| 619 if constructor.is_named_constructor else | 618 if constructor.is_named_constructor else |
| 620 '') %} | 619 '') %} |
| 621 v8::Handle<v8::Object> wrapper = info.Holder(); | 620 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 622 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configurat
ion}}); | 621 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configurat
ion}}); |
| 623 {% endif %} | 622 {% endif %} |
| 624 v8SetReturnValue(info, wrapper); | 623 v8SetReturnValue(info, wrapper); |
| 625 {% endmacro %} | 624 {% endmacro %} |
| OLD | NEW |