| Index: tools/dom/scripts/systemnative.py
|
| diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
|
| index 4c618543fa887244d899e1ac1c4c11827b56b8eb..2c955bdbecc796006746e69b3ecc22ee0e462f66 100644
|
| --- a/tools/dom/scripts/systemnative.py
|
| +++ b/tools/dom/scripts/systemnative.py
|
| @@ -428,7 +428,12 @@ class DartiumBackend(HtmlDartGenerator):
|
| else:
|
| self._members_emitter.Emit(
|
| '\n'
|
| - ' $TYPE operator[](int index) native "$(INTERFACE)_item_Callback";\n',
|
| + ' $TYPE operator[](int index) {\n'
|
| + ' if (index < 0 || index >= length)\n'
|
| + ' throw new RangeError.range(index, 0, length);\n'
|
| + ' return _nativeIndexedGetter(index);\n'
|
| + ' }\n'
|
| + ' $TYPE _nativeIndexedGetter(int index) native "$(INTERFACE)_item_Callback";\n',
|
| TYPE=self.SecureOutputType(element_type),
|
| INTERFACE=self._interface.id)
|
|
|
|
|