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

Unified Diff: Source/bindings/scripts/v8_methods.py

Issue 1086113002: IDL: Improve "includes for type" mechanism in various ways (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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/v8_interface.py ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index f0f9fd0e53dc06a298dd3dbfb816e14e70754779..ed58574e7561b5cf59a69688f41220a1d8e6af07 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -70,7 +70,9 @@ def method_context(interface, method, is_visible=True):
is_static = method.is_static
name = method.name
- idl_type.add_includes_for_type()
+ if is_visible:
+ idl_type.add_includes_for_type(extended_attributes)
+
this_cpp_value = cpp_value(interface, method, len(arguments))
def function_template():
@@ -119,7 +121,7 @@ def method_context(interface, method, is_visible=True):
return {
'activity_logging_world_list': v8_utilities.activity_logging_world_list(method), # [ActivityLogging]
- 'arguments': [argument_context(interface, method, argument, index)
+ 'arguments': [argument_context(interface, method, argument, index, is_visible=is_visible)
for index, argument in enumerate(arguments)],
'argument_declarations_for_private_script':
argument_declarations_for_private_script(interface, method),
@@ -195,9 +197,11 @@ def method_context(interface, method, is_visible=True):
}
-def argument_context(interface, method, argument, index):
+def argument_context(interface, method, argument, index, is_visible=True):
extended_attributes = argument.extended_attributes
idl_type = argument.idl_type
+ if is_visible:
+ idl_type.add_includes_for_type(extended_attributes)
this_cpp_value = cpp_value(interface, method, index)
is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698