35 static int fatal_error_handler_nesting_depth = 0;
38 extern "C" void V8_Fatal(
const char* file,
int line,
const char* format, ...) {
41 fatal_error_handler_nesting_depth++;
43 if (fatal_error_handler_nesting_depth < 2) {
46 va_start(arguments, format);
52 if (fatal_error_handler_nesting_depth < 3) {
53 if (i::FLAG_stack_trace_on_abort) {
55 i::Isolate::Current()->PrintStack();
64 const char* expected_source,
66 const char* value_source,
68 if (!expected->
Equals(value)) {
72 "CHECK_EQ(%s, %s) failed\n# Expected: %s\n# Found: %s",
73 expected_source, value_source, *expected_str, *value_str);
80 const char* unexpected_source,
82 const char* value_source,
84 if (unexpected->
Equals(value)) {
86 V8_Fatal(file, line,
"CHECK_NE(%s, %s) failed\n# Value: %s",
87 unexpected_source, value_source, *value_str);
92 void API_Fatal(
const char* location,
const char* format, ...) {
95 va_start(arguments, format);
103 namespace v8 {
namespace internal {
void API_Fatal(const char *location, const char *format,...)
bool FLAG_enable_slow_asserts
const intptr_t kHeapObjectTagMask
V8EXPORT bool Equals(Handle< Value > that) const
void V8_Fatal(const char *file, int line, const char *format,...)
static void VPrintError(const char *format, va_list args)
intptr_t HeapObjectTagMask()
static void PrintError(const char *format,...)
void CheckNonEqualsHelper(const char *file, int line, const char *unexpected_source, v8::Handle< v8::Value > unexpected, const char *value_source, v8::Handle< v8::Value > value)
void CheckEqualsHelper(const char *file, int line, const char *expected_source, v8::Handle< v8::Value > expected, const char *value_source, v8::Handle< v8::Value > value)