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 {% if method.number_of_required_arguments %} | 10 {% if method.number_of_required_arguments %} |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 {% if method.deprecate_as %} | 324 {% if method.deprecate_as %} |
325 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{method.deprecate_as}}); | 325 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{method.deprecate_as}}); |
326 {% endif %} | 326 {% endif %} |
327 {% endif %}{# not method.overloads #} | 327 {% endif %}{# not method.overloads #} |
328 {% if world_suffix in method.activity_logging_world_list %} | 328 {% if world_suffix in method.activity_logging_world_list %} |
329 DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate()); | 329 DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate()); |
330 if (world.activityLogger()) { | 330 if (world.activityLogger()) { |
331 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) | 331 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) |
332 and delete toVectorOfArguments #} | 332 and delete toVectorOfArguments #} |
333 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 333 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
334 world.activityLogger()->log("{{interface_name}}.{{method.name}}", info.L
ength(), loggerArgs.data(), "Method"); | 334 world.activityLogger()->logMethod("{{interface_name}}.{{method.name}}",
info.Length(), loggerArgs.data()); |
335 } | 335 } |
336 {% endif %} | 336 {% endif %} |
337 {% if method.is_custom %} | 337 {% if method.is_custom %} |
338 {{v8_class}}::{{method.name}}MethodCustom(info); | 338 {{v8_class}}::{{method.name}}MethodCustom(info); |
339 {% else %} | 339 {% else %} |
340 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); | 340 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); |
341 {% endif %} | 341 {% endif %} |
342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
343 } | 343 } |
344 {% endfilter %} | 344 {% endfilter %} |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 {% endfor %} | 478 {% endfor %} |
479 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); | 479 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); |
480 {% if is_constructor_raises_exception %} | 480 {% if is_constructor_raises_exception %} |
481 if (exceptionState.throwIfNeeded()) | 481 if (exceptionState.throwIfNeeded()) |
482 return; | 482 return; |
483 {% endif %} | 483 {% endif %} |
484 | 484 |
485 {{generate_constructor_wrapper(constructor) | indent}} | 485 {{generate_constructor_wrapper(constructor) | indent}} |
486 } | 486 } |
487 {% endmacro %} | 487 {% endmacro %} |
OLD | NEW |