Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: lib/compiler/implementation/lib/mock.dart

Issue 10540052: Only generate assert in checked mode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/lib/mock.dart
===================================================================
--- lib/compiler/implementation/lib/mock.dart (revision 8394)
+++ lib/compiler/implementation/lib/mock.dart (working copy)
@@ -28,7 +28,9 @@
// TODO(ahe): VM specfic exception?
class StaticResolutionException implements Exception {}
-void assert(condition) {}
+void assert(condition) {
kasperl 2012/06/08 05:34:05 I think this needs a bit more work. Something like
ngeoffray 2012/06/08 09:40:58 Done.
+ if (condition !== true) throw new AssertionError();
+}
// TODO(ahe): Not sure ByteArray belongs in the core library.
interface Uint8List extends List default _InternalByteArray {

Powered by Google App Engine
This is Rietveld 408576698