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 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 28 matching lines...) Expand all Loading... |
39 fflush(stdout); | 39 fflush(stdout); |
40 fflush(stderr); | 40 fflush(stderr); |
41 fatal_error_handler_nesting_depth++; | 41 fatal_error_handler_nesting_depth++; |
42 // First time we try to print an error message | 42 // First time we try to print an error message |
43 if (fatal_error_handler_nesting_depth < 2) { | 43 if (fatal_error_handler_nesting_depth < 2) { |
44 i::OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file, line); | 44 i::OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file, line); |
45 va_list arguments; | 45 va_list arguments; |
46 va_start(arguments, format); | 46 va_start(arguments, format); |
47 i::OS::VPrintError(format, arguments); | 47 i::OS::VPrintError(format, arguments); |
48 va_end(arguments); | 48 va_end(arguments); |
49 i::OS::PrintError("\n#\n\n"); | 49 i::OS::PrintError("\n#\n"); |
| 50 i::OS::DumpBacktrace(); |
50 } | 51 } |
51 // First two times we may try to print a stack dump. | 52 // First two times we may try to print a stack dump. |
52 if (fatal_error_handler_nesting_depth < 3) { | 53 if (fatal_error_handler_nesting_depth < 3) { |
53 if (i::FLAG_stack_trace_on_abort) { | 54 if (i::FLAG_stack_trace_on_abort) { |
54 // Call this one twice on double fault | 55 // Call this one twice on double fault |
55 i::Isolate::Current()->PrintStack(); | 56 i::Isolate::Current()->PrintStack(); |
56 } | 57 } |
57 } | 58 } |
58 i::OS::Abort(); | 59 i::OS::Abort(); |
59 } | 60 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 | 103 |
103 namespace v8 { namespace internal { | 104 namespace v8 { namespace internal { |
104 | 105 |
105 bool EnableSlowAsserts() { return FLAG_enable_slow_asserts; } | 106 bool EnableSlowAsserts() { return FLAG_enable_slow_asserts; } |
106 | 107 |
107 intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; } | 108 intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; } |
108 | 109 |
109 } } // namespace v8::internal | 110 } } // namespace v8::internal |
110 | 111 |
OLD | NEW |