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

Unified Diff: Source/bindings/scripts/unstable/v8_types.py

Issue 36793003: IDL compiler: constructor attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 2 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/unstable/v8_types.py
diff --git a/Source/bindings/scripts/unstable/v8_types.py b/Source/bindings/scripts/unstable/v8_types.py
index ea2a59c98f80d996036b99f1b02b75f9ec1c6082..81156d4582efbb1aa9eb10b119129bd5b6c0b935 100644
--- a/Source/bindings/scripts/unstable/v8_types.py
+++ b/Source/bindings/scripts/unstable/v8_types.py
@@ -42,6 +42,7 @@ import posixpath
import re
import idl_definitions # for UnionType
+from v8_utilities import strip_suffix
################################################################################
# IDL types
@@ -183,6 +184,10 @@ TYPED_ARRAYS = {
}
+def constructor_type(idl_type):
+ return strip_suffix(idl_type, 'Constructor')
+
+
def is_dom_node_type(idl_type):
return (idl_type in DOM_NODE_TYPES or
(idl_type.startswith(('HTML', 'SVG')) and
@@ -319,6 +324,8 @@ def includes_for_type(idl_type):
this_array_or_sequence_type = array_or_sequence_type(idl_type)
if this_array_or_sequence_type:
return includes_for_type(this_array_or_sequence_type)
+ if idl_type.endswith('Constructor'):
+ idl_type = constructor_type(idl_type)
return set(['V8%s.h' % idl_type])

Powered by Google App Engine
This is Rietveld 408576698