Index: sdk/lib/_internal/compiler/js_lib/js_string.dart |
diff --git a/sdk/lib/_internal/compiler/js_lib/js_string.dart b/sdk/lib/_internal/compiler/js_lib/js_string.dart |
index e381b1f24c100b3f78ba40b5fd5bfce762692d91..ed8189dd3a814c093dae1ea8510945c40eb10420 100644 |
--- a/sdk/lib/_internal/compiler/js_lib/js_string.dart |
+++ b/sdk/lib/_internal/compiler/js_lib/js_string.dart |
@@ -383,7 +383,7 @@ class JSString extends Interceptor implements String, JSIndexable { |
int indexOf(Pattern pattern, [int start = 0]) { |
checkNull(pattern); |
- if (start is! int) throw new ArgumentError(start); |
+ if (start is! int) throw argumentErrorValue(start); |
if (start < 0 || start > this.length) { |
throw new RangeError.range(start, 0, this.length); |
} |
@@ -406,7 +406,7 @@ class JSString extends Interceptor implements String, JSIndexable { |
if (start == null) { |
start = length; |
} else if (start is! int) { |
- throw new ArgumentError(start); |
+ throw argumentErrorValue(start); |
} else if (start < 0 || start > this.length) { |
throw new RangeError.range(start, 0, this.length); |
} |
@@ -436,7 +436,7 @@ class JSString extends Interceptor implements String, JSIndexable { |
bool get isNotEmpty => !isEmpty; |
int compareTo(String other) { |
- if (other is !String) throw new ArgumentError(other); |
+ if (other is !String) throw argumentErrorValue(other); |
return this == other ? 0 |
: JS('bool', r'# < #', this, other) ? -1 : 1; |
} |