Index: sdk/lib/_internal/compiler/js_lib/js_number.dart |
diff --git a/sdk/lib/_internal/compiler/js_lib/js_number.dart b/sdk/lib/_internal/compiler/js_lib/js_number.dart |
index 0648aad12d6678319908e4bf37abd0cf70ed5395..03c68bb00022ebf28d6f7103ea52da1bb492476f 100644 |
--- a/sdk/lib/_internal/compiler/js_lib/js_number.dart |
+++ b/sdk/lib/_internal/compiler/js_lib/js_number.dart |
@@ -415,6 +415,7 @@ class JSInt extends JSNumber implements int, double { |
int modInverse(int m) { |
if (m is! int) throw new ArgumentError(m); |
if (m <= 0) throw new RangeError(m); |
+ if (this == 0) return 0; |
bool ac = m.isEven; |
int u = m; |
int v = this; |