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 "checks.h" | 5 #include "src/checks.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 <execinfo.h> | 9 # include <execinfo.h> |
10 #elif V8_OS_QNX | 10 #elif V8_OS_QNX |
11 # include <backtrace.h> | 11 # include <backtrace.h> |
12 #endif // V8_LIBC_GLIBC || V8_OS_BSD | 12 #endif // V8_LIBC_GLIBC || V8_OS_BSD |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 | 14 |
15 #include "platform.h" | 15 #include "src/platform.h" |
16 #include "v8.h" | 16 #include "src/v8.h" |
17 | 17 |
18 namespace v8 { | 18 namespace v8 { |
19 namespace internal { | 19 namespace internal { |
20 | 20 |
21 intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; } | 21 intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; } |
22 | 22 |
23 // Attempts to dump a backtrace (if supported). | 23 // Attempts to dump a backtrace (if supported). |
24 void DumpBacktrace() { | 24 void DumpBacktrace() { |
25 #if V8_LIBC_GLIBC || V8_OS_BSD | 25 #if V8_LIBC_GLIBC || V8_OS_BSD |
26 void* trace[100]; | 26 void* trace[100]; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 const char* unexpected_source, | 110 const char* unexpected_source, |
111 v8::Handle<v8::Value> unexpected, | 111 v8::Handle<v8::Value> unexpected, |
112 const char* value_source, | 112 const char* value_source, |
113 v8::Handle<v8::Value> value) { | 113 v8::Handle<v8::Value> value) { |
114 if (unexpected->Equals(value)) { | 114 if (unexpected->Equals(value)) { |
115 v8::String::Utf8Value value_str(value); | 115 v8::String::Utf8Value value_str(value); |
116 V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %s", | 116 V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %s", |
117 unexpected_source, value_source, *value_str); | 117 unexpected_source, value_source, *value_str); |
118 } | 118 } |
119 } | 119 } |
OLD | NEW |