Chromium Code Reviews| Index: tools/dom/scripts/htmldartgenerator.py |
| diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py |
| index 2f13d48413ebdeb932b5feeb23da072e6ce06d18..4ad06276d7be37791ab6f21fa423e55ac2bc79f5 100644 |
| --- a/tools/dom/scripts/htmldartgenerator.py |
| +++ b/tools/dom/scripts/htmldartgenerator.py |
| @@ -231,6 +231,22 @@ 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. |
|
Mads Ager (google)
2013/03/11 14:13:18
Let's expand on the comment?
Temporary ugly hack
Anton Muhin
2013/03/11 14:35:27
Done.
|
| + 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): |