| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 bt_unload_memmap(&memmap); | 91 bt_unload_memmap(&memmap); |
| 92 bt_release_accessor(&acc); | 92 bt_release_accessor(&acc); |
| 93 #endif // V8_LIBC_GLIBC || V8_OS_BSD | 93 #endif // V8_LIBC_GLIBC || V8_OS_BSD |
| 94 } | 94 } |
| 95 | 95 |
| 96 } } // namespace v8::internal | 96 } } // namespace v8::internal |
| 97 | 97 |
| 98 | 98 |
| 99 // Contains protection against recursive calls (faults while handling faults). | 99 // Contains protection against recursive calls (faults while handling faults). |
| 100 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { | 100 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { |
| 101 i::AllowHandleDereference allow_deref; | |
| 102 i::AllowDeferredHandleDereference allow_deferred_deref; | |
| 103 fflush(stdout); | 101 fflush(stdout); |
| 104 fflush(stderr); | 102 fflush(stderr); |
| 105 i::OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file, line); | 103 i::OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file, line); |
| 106 va_list arguments; | 104 va_list arguments; |
| 107 va_start(arguments, format); | 105 va_start(arguments, format); |
| 108 i::OS::VPrintError(format, arguments); | 106 i::OS::VPrintError(format, arguments); |
| 109 va_end(arguments); | 107 va_end(arguments); |
| 110 i::OS::PrintError("\n#\n"); | 108 i::OS::PrintError("\n#\n"); |
| 111 v8::internal::DumpBacktrace(); | 109 v8::internal::DumpBacktrace(); |
| 112 fflush(stderr); | 110 fflush(stderr); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 135 const char* unexpected_source, | 133 const char* unexpected_source, |
| 136 v8::Handle<v8::Value> unexpected, | 134 v8::Handle<v8::Value> unexpected, |
| 137 const char* value_source, | 135 const char* value_source, |
| 138 v8::Handle<v8::Value> value) { | 136 v8::Handle<v8::Value> value) { |
| 139 if (unexpected->Equals(value)) { | 137 if (unexpected->Equals(value)) { |
| 140 v8::String::Utf8Value value_str(value); | 138 v8::String::Utf8Value value_str(value); |
| 141 V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %s", | 139 V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %s", |
| 142 unexpected_source, value_source, *value_str); | 140 unexpected_source, value_source, *value_str); |
| 143 } | 141 } |
| 144 } | 142 } |
| OLD | NEW |