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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_interface.py

Issue 2376913002: [Bindings] Drop a global variable 'interfaces' in v8_globals (Closed)
Patch Set: Update documents Created 4 years, 3 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 | « third_party/WebKit/Source/bindings/scripts/v8_globals.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/scripts/v8_interface.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
index f410fb68a95f1f9f622c49f99aa895889c545db0..86a596357364db32414d96e8a80093241c956745 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -132,7 +132,18 @@ def origin_trial_features(interface, constants, attributes, methods):
return sorted(features)
-def interface_context(interface):
+def interface_context(interface, interfaces):
+ """Creates a Jinja template context for an interface.
+
+ Args:
+ interface: An interface to create the context for
+ interfaces: A dict which maps an interface name to the definition
+ which can be referred if needed
+
+ Returns:
+ A Jinja template context for |interface|
+ """
+
includes.clear()
includes.update(INTERFACE_CPP_INCLUDES)
header_includes = set(INTERFACE_H_INCLUDES)
@@ -333,7 +344,7 @@ def interface_context(interface):
})
# Attributes
- attributes = [v8_attributes.attribute_context(interface, attribute)
+ attributes = [v8_attributes.attribute_context(interface, attribute, interfaces)
for attribute in interface.attributes]
has_conditional_attributes = any(attribute['exposed_test'] for attribute in attributes)
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/v8_globals.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698