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

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

Issue 1085453003: IDL: Add support for [Unscopeable] on attributes and methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixes 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/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 1e1bd83912a5de375739dec37d9ffac3873a37b4..e9bd37af752c8991d0962b405a04d4b68c9ddef7 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -243,6 +243,15 @@ def interface_context(interface):
includes.add('bindings/core/v8/V8ObjectConstructor.h')
includes.add('core/frame/LocalDOMWindow.h')
+ # [Unscopeable] attributes and methods
+ unscopeables = []
+ for attribute in interface.attributes:
+ if 'Unscopeable' in attribute.extended_attributes:
+ unscopeables.append(attribute.name)
+ for method in interface.operations:
+ if 'Unscopeable' in method.extended_attributes:
+ unscopeables.append(method.name)
+
context.update({
'any_type_attributes': any_type_attributes,
'constructors': constructors,
@@ -252,6 +261,7 @@ def interface_context(interface):
interface_length(interface, constructors + custom_constructors),
'is_constructor_raises_exception': extended_attributes.get('RaisesException') == 'Constructor', # [RaisesException=Constructor]
'named_constructor': named_constructor,
+ 'unscopeables': sorted(unscopeables),
})
constants = [constant_context(constant, interface) for constant in interface.constants]
« 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