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

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

Issue 1202683002: bindings: Supports per-member [Exposed] for attributes on prototype. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 5 years, 6 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/core/v8/WrapperTypeInfo.h ('k') | Source/bindings/templates/interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index 0ecfb2b32ad236a47cb9071aadb403ab980f247e..8c4aef85f6e69b9532bd6c8327f01e167c545e18 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -298,7 +298,6 @@ def interface_context(interface):
attribute['runtime_enabled_function'])
and attribute['should_be_exposed_to_script']
for attribute in attributes),
- 'has_conditional_attributes': has_conditional_attributes,
'has_constructor_attributes': any(attribute['constructor_type'] for attribute in attributes),
'has_replaceable_attributes': any(attribute['is_replaceable'] for attribute in attributes),
})
@@ -560,6 +559,20 @@ def interface_context(interface):
'methods': methods,
})
+ # Conditionally enabled members
+ has_conditional_attributes_on_instance = any(
+ attribute['exposed_test'] and attribute['on_instance']
+ for attribute in attributes)
+ has_conditional_attributes_on_prototype = any(
+ attribute['exposed_test'] and attribute['on_prototype']
+ for attribute in attributes)
+ context.update({
+ 'has_conditional_attributes_on_instance':
+ has_conditional_attributes_on_instance,
+ 'has_conditional_attributes_on_prototype':
+ has_conditional_attributes_on_prototype,
+ })
+
context.update({
'indexed_property_getter': property_getter(interface.indexed_property_getter, ['index']),
'indexed_property_setter': property_setter(interface.indexed_property_setter, interface),
« no previous file with comments | « Source/bindings/core/v8/WrapperTypeInfo.h ('k') | Source/bindings/templates/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698