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

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

Issue 1763063003: Fixed typedef used globally in IDLs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/generator.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 e3e96257a7836ce88c7adb378bd6972bcf8fd90d..e03a0fa39b9a2dbc525f364df50602b0cdaeabd0 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -12,7 +12,7 @@ import os
import re
import shutil
from generator import *
-from idlnode import IDLType
+from idlnode import IDLType, resolveTypedef
_logger = logging.getLogger('dartgenerator')
@@ -98,6 +98,15 @@ class DartGenerator(object):
type_name.endswith('Constructor')):
_logger.warn('removing %s in %s which has unidentified type %s' %
(node_name, interface.id, type_name))
+
+ # One last check is the type a typedef in an IDL file (the typedefs
+ # are treated as global).
+ resolvedType = resolveTypedef(idl_type)
+ if (resolvedType != idl_type):
+ idl_type.id = resolvedType.id
+ idl_type.nullable = resolvedType.nullable
+ continue
+
return False
return True
« no previous file with comments | « tools/dom/dom.json ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698