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

Unified Diff: tools/dom/scripts/generator.py

Issue 2948493002: Typedefs and IDL file order between platforms could generated different files. (Closed)
Patch Set: typedefs and IDL xfile ordering between platforms could generated different files Created 3 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 | « no previous file | tools/dom/scripts/idlnode.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index b8c3237e55b961809148e7b65886e9eba66ba614..3e81e9b12ba4948f6866033822463ef54e1dd3d8 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -1467,13 +1467,13 @@ _idl_type_registry = monitored.Dict('generator._idl_type_registry', {
'MediaKeySystemConfiguration': TypeData(clazz='Primitive', dart_type='Map'),
'DOMTimeStamp': TypeData(clazz='Primitive', dart_type='int', native_type='unsigned long long'),
'object': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptValue'),
- 'ObjectArray': TypeData(clazz='Primitive', dart_type='List'),
'PositionOptions': TypeData(clazz='Primitive', dart_type='Object'),
# TODO(sra): Come up with some meaningful name so that where this appears in
# the documentation, the user is made aware that only a limited subset of
# serializable types are actually permitted.
'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='dynamic'),
'sequence': TypeData(clazz='Primitive', dart_type='List'),
+ 'sequence<any>': TypeData(clazz='Primitive', dart_type='List'),
'void': TypeData(clazz='Primitive', dart_type='void'),
'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule']),
@@ -1610,7 +1610,8 @@ class TypeRegistry(object):
def _TypeInfo(self, type_name):
match = re.match(r'(?:sequence<([\w ]+)>|(\w+)\[\])$', type_name)
- if match:
+ # sequence<any> should not be List<Object>
+ if match and match.group(1) != 'any':
type_data = TypeData('Sequence')
if self.HasTypeDef(match.group(1) or match.group(2)):
# It's a typedef (union)
« no previous file with comments | « no previous file | tools/dom/scripts/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698