| Index: Source/bindings/templates/methods.cpp
|
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d59ba5fb2ace722ef9abe399047405c4c7216bf2
|
| --- /dev/null
|
| +++ b/Source/bindings/templates/methods.cpp
|
| @@ -0,0 +1,21 @@
|
| +{##############################################################################}
|
| +{% macro generate_method(method) %}
|
| +static void {{method.name}}Method(const v8::FunctionCallbackInfo<v8::Value>& args)
|
| +{
|
| + {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(args.Holder());
|
| + imp->{{method.name}}();
|
| +
|
| + return;
|
| +}
|
| +{% endmacro %}
|
| +
|
| +
|
| +{##############################################################################}
|
| +{% macro method_callback(method) %}
|
| +static void {{method.name}}MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
|
| + {{cpp_class_name}}V8Internal::{{method.name}}Method(args);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
|
| +}
|
| +{% endmacro %}
|
|
|