| Index: tools/dom/scripts/htmldartgenerator.py
|
| diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
|
| index 2f13d48413ebdeb932b5feeb23da072e6ce06d18..7a8ad33bd616b45cb55998ab8445b1c16dfdf9e9 100644
|
| --- a/tools/dom/scripts/htmldartgenerator.py
|
| +++ b/tools/dom/scripts/htmldartgenerator.py
|
| @@ -231,6 +231,25 @@ class HtmlDartGenerator(object):
|
| argument = signatures[signature_index][i]
|
| parameter_name = parameter_names[i]
|
| test_type = self._DartType(argument.type.id)
|
| + # TODO(antonm): temporary ugly hack to be able to work with existing
|
| + # typed array types as well as dart:typeddata types until
|
| + # the transition to dart:typeddata is complete for both dart2js
|
| + # and dartium.
|
| + from systemnative import DartiumBackend
|
| + if isinstance(self, DartiumBackend):
|
| + if argument.type.id == 'ArrayBufferView':
|
| + checks.append(
|
| + '(%(name)s is ArrayBufferView '
|
| + '|| %(name)s is _typeddata.TypedData '
|
| + '|| %(name)s == null)' % {'name': parameter_name})
|
| + continue
|
| + if argument.type.id == 'ArrayBuffer':
|
| + checks.append(
|
| + '(%(name)s is ArrayBuffer '
|
| + '|| %(name)s is _typeddata.ByteBuffer '
|
| + '|| %(name)s == null)' % {'name': parameter_name})
|
| + continue
|
| + # end of ugly hack.
|
| if test_type in ['dynamic', 'Object']:
|
| checks.append('?%s' % parameter_name)
|
| elif not can_omit_type_check(test_type, i):
|
|
|