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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 {% endif %} | 293 {% endif %} |
294 {% if method.deprecate_as %} | 294 {% if method.deprecate_as %} |
295 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{method.deprecate_as}}); | 295 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{method.deprecate_as}}); |
296 {% endif %} | 296 {% endif %} |
297 {% if world_suffix in method.activity_logging_world_list %} | 297 {% if world_suffix in method.activity_logging_world_list %} |
298 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 298 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
299 if (contextData && contextData->activityLogger()) { | 299 if (contextData && contextData->activityLogger()) { |
300 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) | 300 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) |
301 and delete toVectorOfArguments #} | 301 and delete toVectorOfArguments #} |
302 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 302 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
303 contextData->activityLogger()->log("{{interface_name}}.{{method.name}}",
info.Length(), loggerArgs.data(), "Method"); | 303 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); |
304 } | 304 } |
305 {% endif %} | 305 {% endif %} |
306 {% if method.is_custom %} | 306 {% if method.is_custom %} |
307 {{v8_class}}::{{method.name}}MethodCustom(info); | 307 {{v8_class}}::{{method.name}}MethodCustom(info); |
308 {% else %} | 308 {% else %} |
309 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); | 309 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); |
310 {% endif %} | 310 {% endif %} |
311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
312 } | 312 } |
313 {% endfilter %} | 313 {% endfilter %} |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 446 |
447 {% if has_custom_wrap %} | 447 {% if has_custom_wrap %} |
448 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIso
late()); | 448 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIso
late()); |
449 {% else %} | 449 {% else %} |
450 v8::Handle<v8::Object> wrapper = info.Holder(); | 450 v8::Handle<v8::Object> wrapper = info.Holder(); |
451 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{v8
_class}}Constructor::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_conf
iguration}}); | 451 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{v8
_class}}Constructor::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_conf
iguration}}); |
452 {% endif %} | 452 {% endif %} |
453 v8SetReturnValue(info, wrapper); | 453 v8SetReturnValue(info, wrapper); |
454 } | 454 } |
455 {% endmacro %} | 455 {% endmacro %} |
OLD | NEW |