Make Runtime_Abort print to stderr instead of stdout.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/15298005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 881476a7
......@@ -53,7 +53,7 @@ extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) {
if (fatal_error_handler_nesting_depth < 3) {
if (i::FLAG_stack_trace_on_abort) {
// Call this one twice on double fault
i::Isolate::Current()->PrintStack();
i::Isolate::Current()->PrintStack(stderr);
}
}
i::OS::Abort();
......
......@@ -5933,7 +5933,7 @@ bool Heap::IdleGlobalGC() {
void Heap::Print() {
if (!HasBeenSetUp()) return;
isolate()->PrintStack();
isolate()->PrintStack(stdout);
AllSpaces spaces(this);
for (Space* space = spaces.next(); space != NULL; space = spaces.next()) {
space->Print();
......
......@@ -835,7 +835,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace(
}
void Isolate::PrintStack() {
void Isolate::PrintStack(FILE* out) {
if (stack_trace_nesting_level_ == 0) {
stack_trace_nesting_level_++;
......@@ -850,7 +850,7 @@ void Isolate::PrintStack() {
StringStream accumulator(allocator);
incomplete_message_ = &accumulator;
PrintStack(&accumulator);
accumulator.OutputToStdOut();
accumulator.OutputToFile(out);
InitializeLoggingAndCounters();
accumulator.Log();
incomplete_message_ = NULL;
......@@ -865,7 +865,7 @@ void Isolate::PrintStack() {
"\n\nAttempt to print stack while printing stack (double fault)\n");
OS::PrintError(
"If you are lucky you may find a partial stack dump on stdout.\n\n");
incomplete_message_->OutputToStdOut();
incomplete_message_->OutputToFile(out);
}
}
......
......@@ -725,7 +725,7 @@ class Isolate {
void PrintCurrentStackTrace(FILE* out);
void PrintStackTrace(FILE* out, char* thread_data);
void PrintStack(StringStream* accumulator);
void PrintStack();
void PrintStack(FILE* out);
Handle<String> StackTraceString();
NO_INLINE(void PushStackTraceAndDie(unsigned int magic,
Object* object,
......
......@@ -8991,7 +8991,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrint) {
RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugTrace) {
NoHandleAllocation ha(isolate);
ASSERT(args.length() == 0);
isolate->PrintStack();
isolate->PrintStack(stdout);
return isolate->heap()->undefined_value();
}
......@@ -13099,7 +13099,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Abort) {
ASSERT(args.length() == 2);
OS::PrintError("abort: %s\n",
reinterpret_cast<char*>(args[0]) + args.smi_at(1));
isolate->PrintStack();
isolate->PrintStack(stderr);
OS::Abort();
UNREACHABLE();
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment