Chromium Code Reviews| Index: runtime/lib/errors_patch.dart |
| diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart |
| index 69ae2195426a26a25a71c4346cb0d61cdf0e77a3..412f534ce7c13d0f71dd9a3306d79e20c04f9607 100644 |
| --- a/runtime/lib/errors_patch.dart |
| +++ b/runtime/lib/errors_patch.dart |
| @@ -33,6 +33,9 @@ class _AssertionError extends Error implements AssertionError { |
| native "AssertionError_throwNew"; |
| static _evaluateAssertion(condition) { |
| + if (identical(condition, true) || identical(condition, false)) { |
| + return condition; |
| + } |
| if (condition is Function) { |
|
rmacnak
2017/02/02 19:02:05
It might be worth adding
if (condition is _Closur
Cutch
2017/02/02 19:57:49
Done.
|
| condition = condition(); |
| } |