Index: runtime/lib/errors_patch.dart |
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart |
index 8c995a4d146537d169781e1a088bdb710545f0e2..faf342b66a1db9ba2e1dac802b1699d78182c846 100644 |
--- a/runtime/lib/errors_patch.dart |
+++ b/runtime/lib/errors_patch.dart |
@@ -26,9 +26,13 @@ class _AssertionError extends Error implements AssertionError { |
static _throwNew(int assertionStart, int assertionEnd) |
native "AssertionError_throwNew"; |
- static _handleCondition(condition) { |
- if (condition is Function) return condition(); |
- return condition; |
+ static void _checkAssertion(condition, int start, int end) { |
+ if (condition is Function) { |
+ condition = condition(); |
+ } |
+ if (!condition) { |
+ _throwNew(start, end); |
+ } |
} |
String toString() { |