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

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

Issue 952133004: Changes to support roll 39 IDLs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 5 years, 10 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 | « tools/dom/dom.json ('k') | tools/dom/scripts/dartmetadata.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/dartgenerator.py
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py
index bb96bd3d72e7d8985f54ac568e096e5c2aa97db2..1b8db338c8fb4bf1cd6080ce1e4d96915138aa3a 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -45,7 +45,8 @@ class DartGenerator(object):
return self._IsCompoundType(database, type_name[:-len('[]')])
stripped_type_name = self._StripModules(type_name)
- if database.HasInterface(stripped_type_name):
+ if (database.HasInterface(stripped_type_name) or
+ database.HasDictionary(stripped_type_name)):
return True
if database.HasEnum(stripped_type_name):
@@ -229,7 +230,13 @@ class DartGenerator(object):
ARG = idlnode.IDLArgument([('Type', ('ScopedName', 'object')), ('Id', 'arg')])
for interface in database.GetInterfaces():
for operation in interface.operations:
- call_with = (operation.ext_attrs.get('CallWith', '') +
- operation.ext_attrs.get('ConstructorCallWith', ''))
+ call_with = operation.ext_attrs.get('CallWith', [])
+ if not(isinstance(call_with, list)):
+ call_with = [call_with]
+ constructor_with = operation.ext_attrs.get('ConstructorCallWith', [])
+ if not(isinstance(constructor_with, list)):
+ constructor_with = [constructor_with]
+ call_with = call_with + constructor_with
+
if 'ScriptArguments' in call_with:
operation.arguments.append(ARG)
« no previous file with comments | « tools/dom/dom.json ('k') | tools/dom/scripts/dartmetadata.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698