| Index: tools/dom/scripts/htmldartgenerator.py
|
| diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
|
| index 0dc105415817ab79c08e15ece11bbb821d4f9215..1032f706ad2d6b50d953b1c733016326577f4943 100644
|
| --- a/tools/dom/scripts/htmldartgenerator.py
|
| +++ b/tools/dom/scripts/htmldartgenerator.py
|
| @@ -240,11 +240,21 @@ class HtmlDartGenerator(object):
|
| argument = signatures[signature_index][i]
|
| parameter_name = parameter_names[i]
|
| test_type = self._DartType(argument.type.id)
|
| + nullable = False or argument.type.nullable
|
| +
|
| if test_type in ['dynamic', 'Object']:
|
| checks.append('?%s' % parameter_name)
|
| elif not can_omit_type_check(test_type, i):
|
| + nullable = True
|
| checks.append('(%s is %s || %s == null)' % (
|
| parameter_name, test_type, parameter_name))
|
| +
|
| + if not nullable:
|
| + for signature in signatures:
|
| + if (len(signature) <= i or signature[i] != argument):
|
| + checks.append('%s != null' % parameter_name)
|
| + break
|
| +
|
| # There can be multiple presence checks. We need them all since a later
|
| # optional argument could have been passed by name, leaving 'holes'.
|
| checks.extend(['!?%s' % name for name in parameter_names[argument_count:]])
|
|
|