| Index: sdk/lib/_internal/lib/js_string.dart
|
| diff --git a/sdk/lib/_internal/lib/js_string.dart b/sdk/lib/_internal/lib/js_string.dart
|
| index 36372f46c9caee94754fe3ae48935c9a4d676443..a6962cb2432eb24af6e5a6f614d75bbdd3014bc9 100644
|
| --- a/sdk/lib/_internal/lib/js_string.dart
|
| +++ b/sdk/lib/_internal/lib/js_string.dart
|
| @@ -20,9 +20,13 @@ class JSString extends Interceptor implements String, JSIndexable {
|
| return JS('JSUInt31', r'#.charCodeAt(#)', this, index);
|
| }
|
|
|
| - Iterable<Match> allMatches(String str) {
|
| - checkString(str);
|
| - return allMatchesInStringUnchecked(this, str);
|
| + Iterable<Match> allMatches(String string, [int start = 0]) {
|
| + checkString(string);
|
| + checkInt(start);
|
| + if (0 > start || start > string.length) {
|
| + throw new RangeError.range(start, 0, string.length);
|
| + }
|
| + return allMatchesInStringUnchecked(this, string, start);
|
| }
|
|
|
| Match matchAsPrefix(String string, [int start = 0]) {
|
|
|