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

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

Issue 144033007: IDL compiler: ForMainWorld for method arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/scripts/unstable/v8_methods.py ('k') | Source/bindings/tests/idls/TestInterfaceNode.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
index 106a30014ad8e38dca3b2b76e56705bfd5a22a66..d45d9ab1974094886a9467227929097646bf5bf6 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -37,7 +37,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
}
{% endif %}
{% for argument in method.arguments %}
- {{generate_argument(method, argument) | indent}}
+ {{generate_argument(method, argument, world_suffix) | indent}}
{% endfor %}
{% if world_suffix %}
{{cpp_method_call(method, method.v8_set_return_value_for_main_world, method.cpp_value) | indent}}
@@ -78,7 +78,7 @@ if (listener) {
{######################################}
-{% macro generate_argument(method, argument) %}
+{% macro generate_argument(method, argument, world_suffix) %}
{% if argument.is_optional and not argument.has_default and
argument.idl_type != 'Dictionary' and
not argument.is_callback_interface %}
@@ -86,7 +86,11 @@ if (listener) {
fewer arguments if they are omitted.
Optional Dictionary arguments default to empty dictionary. #}
if (UNLIKELY(info.Length() <= {{argument.index}})) {
+ {% if world_suffix %}
+ {{cpp_method_call(method, argument.v8_set_return_value_for_main_world, argument.cpp_value) | indent}}
+ {% else %}
{{cpp_method_call(method, argument.v8_set_return_value, argument.cpp_value) | indent}}
+ {% endif %}
return;
}
{% endif %}
« no previous file with comments | « Source/bindings/scripts/unstable/v8_methods.py ('k') | Source/bindings/tests/idls/TestInterfaceNode.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698