Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: Source/bindings/templates/methods.cpp

Issue 39493002: IDL compiler: void() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/templates/interface_base.cpp ('k') | Source/bindings/tests/idls/TestObjectPython.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 %}
« no previous file with comments | « Source/bindings/templates/interface_base.cpp ('k') | Source/bindings/tests/idls/TestObjectPython.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698