Index: runtime/lib/regexp_patch.dart |
diff --git a/runtime/lib/regexp_patch.dart b/runtime/lib/regexp_patch.dart |
index d6e830c95048ee4186f1799c7e1fd7d2cf887719..6a921fa9a0769a42d7ca33f37e1e973289b2c4d2 100644 |
--- a/runtime/lib/regexp_patch.dart |
+++ b/runtime/lib/regexp_patch.dart |
@@ -77,6 +77,7 @@ class _JSSyntaxRegExp implements RegExp { |
} |
Iterable<Match> allMatches(String str) { |
+ if (str is! String) throw new ArgumentError(str); |
List<Match> result = new List<Match>(); |
int length = str.length; |
int startIndex = 0; |