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

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

Issue 1154943009: bindings: Remove [EventConstructor] and [InitializedByEventConstructor] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
Index: Source/bindings/scripts/v8_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index 2b3513706897dbe8436a9f4b6225ce661ea9c2a0..2f68dbf93b62d18a11c2067314525ec86745d8d8 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -220,20 +220,10 @@ def interface_context(interface):
number_of_required_arguments(constructor),
} for constructor in interface.custom_constructors]
- # [EventConstructor]
- has_event_constructor = 'EventConstructor' in extended_attributes
- any_type_attributes = [attribute for attribute in interface.attributes
- if attribute.idl_type.name == 'Any']
- if has_event_constructor:
- includes.add('bindings/core/v8/Dictionary.h')
- if any_type_attributes:
- includes.add('bindings/core/v8/SerializedScriptValue.h')
- includes.add('bindings/core/v8/SerializedScriptValueFactory.h')
-
# [NamedConstructor]
named_constructor = named_constructor_context(interface)
- if constructors or custom_constructors or has_event_constructor or named_constructor:
+ if constructors or custom_constructors or named_constructor:
if interface.is_partial:
raise Exception('[Constructor] and [NamedConstructor] MUST NOT be'
' specified on partial interface definitions:'
@@ -252,10 +242,8 @@ def interface_context(interface):
unscopeables.append((method.name, v8_utilities.runtime_enabled_function_name(method)))
context.update({
- 'any_type_attributes': any_type_attributes,
'constructors': constructors,
'has_custom_constructor': bool(custom_constructors),
- 'has_event_constructor': has_event_constructor,
'interface_length':
interface_length(interface, constructors + custom_constructors),
'is_constructor_raises_exception': extended_attributes.get('RaisesException') == 'Constructor', # [RaisesException=Constructor]
@@ -1253,8 +1241,6 @@ def number_of_required_arguments(constructor):
def interface_length(interface, constructors):
# Docs: http://heycam.github.io/webidl/#es-interface-call
- if 'EventConstructor' in interface.extended_attributes:
- return 1
if not constructors:
return 0
return min(constructor['number_of_required_arguments']

Powered by Google App Engine
This is Rietveld 408576698