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

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

Issue 296403007: Set correct Function.length on overloaded methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 | « no previous file | Source/bindings/templates/methods.cpp » ('j') | Source/bindings/templates/methods.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index 7078e454decd8f034d5359708d056b968aef5bfb..9f42310831bda4ca7f9470428942115cfdb5525c 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -51,13 +51,14 @@
{##############################################################################}
+{% from 'methods.cpp' import method_length %}
{% macro method_configuration(method) %}
{% set method_callback =
'%sV8Internal::%sMethodCallback' % (cpp_class, method.name) %}
{% set method_callback_for_main_world =
'%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class, method.name)
if method.is_per_world_bindings else '0' %}
-{"{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}}, {{method.number_of_required_or_variadic_arguments}}}
+{"{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}}, {{method_length(method)}}}
{%- endmacro %}
@@ -1078,7 +1079,7 @@ static void configure{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> funct
(cpp_class, method.name, world_suffix) %}
{% set property_attribute = 'static_cast<v8::PropertyAttribute>(%s)' %
' | '.join(method.property_attributes) %}
-{{method.function_template}}->Set(v8AtomicString(isolate, "{{method.name}}"), v8::FunctionTemplate::New(isolate, {{method_callback}}, v8Undefined(), {{method.signature}}, {{method.number_of_required_or_variadic_arguments}}){% if method.property_attributes %}, {{property_attribute}}{% endif %});
+{{method.function_template}}->Set(v8AtomicString(isolate, "{{method.name}}"), v8::FunctionTemplate::New(isolate, {{method_callback}}, v8Undefined(), {{method.signature}}, {{method_length(method)}}){% if method.property_attributes %}, {{property_attribute}}{% endif %});
{%- endmacro %}
« no previous file with comments | « no previous file | Source/bindings/templates/methods.cpp » ('j') | Source/bindings/templates/methods.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698