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

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

Issue 367913002: Merge request for r37883 (Closed) Base URL: https://dart.googlecode.com/svn/branches/1.5/dart
Patch Set: Created 6 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 | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/htmldartgenerator.py
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index c81be535ae65e56b779034ad232b2d66f0e17298..b6c4346799d7b72a8340d12f943e35ad5208e3ca 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -358,7 +358,8 @@ class HtmlDartGenerator(object):
for i in reversed(range(0, argument_count)):
argument = signatures[signature_index][i]
parameter_name = parameter_names[i]
- test_type = self._DartType(argument.type.id)
+
+ test_type = self._NarrowToImplementationType(argument.type.id)
if test_type in ['dynamic', 'Object']:
checks.append('%s != null' % parameter_name)
@@ -755,6 +756,12 @@ class HtmlDartGenerator(object):
if type_name in _secure_base_types:
return _secure_base_types[type_name]
+ def _NarrowToImplementationType(self, type_name):
+ return self._type_registry.TypeInfo(type_name).narrow_dart_type()
+
+ def _NarrowInputType(self, type_name):
+ return self._NarrowToImplementationType(type_name)
+
def _DartType(self, type_name):
return self._type_registry.DartType(type_name)
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698