| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/base/logging.h" | 5 #include "src/base/logging.h" |
| 6 | 6 |
| 7 #if V8_LIBC_GLIBC || V8_OS_BSD | 7 #if V8_LIBC_GLIBC || V8_OS_BSD |
| 8 #include <cxxabi.h> | 8 #include <cxxabi.h> |
| 9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
| 10 #include <execinfo.h> | 10 #include <execinfo.h> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 line); | 108 line); |
| 109 va_list arguments; | 109 va_list arguments; |
| 110 va_start(arguments, format); | 110 va_start(arguments, format); |
| 111 v8::base::OS::VPrintError(format, arguments); | 111 v8::base::OS::VPrintError(format, arguments); |
| 112 va_end(arguments); | 112 va_end(arguments); |
| 113 v8::base::OS::PrintError("\n#\n"); | 113 v8::base::OS::PrintError("\n#\n"); |
| 114 v8::base::DumpBacktrace(); | 114 v8::base::DumpBacktrace(); |
| 115 fflush(stderr); | 115 fflush(stderr); |
| 116 v8::base::OS::Abort(); | 116 v8::base::OS::Abort(); |
| 117 } | 117 } |
| 118 | |
| 119 extern "C" void V8_RuntimeError(const char* file, int line, | |
| 120 const char* message) { | |
| 121 fflush(stdout); | |
| 122 fflush(stderr); | |
| 123 v8::base::OS::PrintError("\n\n#\n# Runtime error in %s, line %d\n# ", file, | |
| 124 line); | |
| 125 v8::base::OS::PrintError("\n# %s\n", message); | |
| 126 v8::base::DumpBacktrace(); | |
| 127 fflush(stderr); | |
| 128 } | |
| OLD | NEW |