Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <cstdlib> | 5 #include <cstdlib> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "vm/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "vm/globals.h" | |
|
Mads Ager (chromium)
2012/01/13 14:42:08
What is this needed for? Maybe that part of vm/glo
Ivan Posva
2012/01/13 23:22:06
Agree, should it be allowed to access "vm/*" heade
Søren Gjesse
2012/01/16 08:58:00
Yes it should. This is actually done in http://cod
Søren Gjesse
2012/01/16 08:58:00
Absolutely - there should be no references from pl
| |
| 10 | 11 |
| 11 namespace dart { | 12 namespace dart { |
| 12 | 13 |
| 13 // Exit with a failure code when we miss an EXPECT check. | 14 // Exit with a failure code when we miss an EXPECT check. |
| 14 static void failed_exit(void) { | 15 static void failed_exit(void) { |
| 15 exit(255); | 16 exit(255); |
| 16 } | 17 } |
| 17 | 18 |
| 18 void DynamicAssertionHelper::Fail(const char* format, ...) { | 19 void DynamicAssertionHelper::Fail(const char* format, ...) { |
| 19 std::stringstream stream; | 20 std::stringstream stream; |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 39 std::abort(); | 40 std::abort(); |
| 40 } | 41 } |
| 41 static bool failed = false; | 42 static bool failed = false; |
| 42 if (!failed) { | 43 if (!failed) { |
| 43 std::atexit(&failed_exit); | 44 std::atexit(&failed_exit); |
| 44 } | 45 } |
| 45 failed = true; | 46 failed = true; |
| 46 } | 47 } |
| 47 | 48 |
| 48 } // namespace dart | 49 } // namespace dart |
| OLD | NEW |