OLD | NEW |
1 // Copyright (c) 2012, 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 "platform/assert.h" | 5 #include "platform/assert.h" |
6 | 6 |
7 #include "platform/globals.h" | 7 #include "platform/globals.h" |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
9 #include "vm/profiler.h" | 9 #include "vm/profiler.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 sizeof(buffer) - file_and_line_length, format, arguments); | 31 sizeof(buffer) - file_and_line_length, format, arguments); |
32 va_end(arguments); | 32 va_end(arguments); |
33 | 33 |
34 // Print the buffer on stderr and/or syslog. | 34 // Print the buffer on stderr and/or syslog. |
35 OS::PrintErr("%s\n", buffer); | 35 OS::PrintErr("%s\n", buffer); |
36 | 36 |
37 // In case of failed assertions, abort right away. Otherwise, wait | 37 // In case of failed assertions, abort right away. Otherwise, wait |
38 // until the program is exiting before producing a non-zero exit | 38 // until the program is exiting before producing a non-zero exit |
39 // code through abort. | 39 // code through abort. |
40 if (kind_ == ASSERT) { | 40 if (kind_ == ASSERT) { |
41 NOT_IN_PRODUCT(Profiler::DumpStackTrace(true /* native_stack_trace */)); | 41 NOT_IN_PRODUCT(Profiler::DumpStackTrace()); |
42 OS::Abort(); | 42 OS::Abort(); |
43 } | 43 } |
44 failed_ = true; | 44 failed_ = true; |
45 } | 45 } |
46 | 46 |
47 } // namespace dart | 47 } // namespace dart |
OLD | NEW |