Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: src/runtime.cc

Issue 15298005: Make Runtime_Abort print to stderr instead of stdout. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 8973 matching lines...) Expand 10 before | Expand all | Expand 10 after
8984 PrintF("\n"); 8984 PrintF("\n");
8985 Flush(); 8985 Flush();
8986 8986
8987 return args[0]; // return TOS 8987 return args[0]; // return TOS
8988 } 8988 }
8989 8989
8990 8990
8991 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugTrace) { 8991 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugTrace) {
8992 NoHandleAllocation ha(isolate); 8992 NoHandleAllocation ha(isolate);
8993 ASSERT(args.length() == 0); 8993 ASSERT(args.length() == 0);
8994 isolate->PrintStack(); 8994 isolate->PrintStack(stdout);
8995 return isolate->heap()->undefined_value(); 8995 return isolate->heap()->undefined_value();
8996 } 8996 }
8997 8997
8998 8998
8999 RUNTIME_FUNCTION(MaybeObject*, Runtime_DateCurrentTime) { 8999 RUNTIME_FUNCTION(MaybeObject*, Runtime_DateCurrentTime) {
9000 NoHandleAllocation ha(isolate); 9000 NoHandleAllocation ha(isolate);
9001 ASSERT(args.length() == 0); 9001 ASSERT(args.length() == 0);
9002 9002
9003 // According to ECMA-262, section 15.9.1, page 117, the precision of 9003 // According to ECMA-262, section 15.9.1, page 117, the precision of
9004 // the number in a Date object representing a particular instant in 9004 // the number in a Date object representing a particular instant in
(...skipping 4087 matching lines...) Expand 10 before | Expand all | Expand 10 after
13092 return isolate->heap()->AllocateStringFromOneByte(CStrVector(version_string), 13092 return isolate->heap()->AllocateStringFromOneByte(CStrVector(version_string),
13093 NOT_TENURED); 13093 NOT_TENURED);
13094 } 13094 }
13095 13095
13096 13096
13097 RUNTIME_FUNCTION(MaybeObject*, Runtime_Abort) { 13097 RUNTIME_FUNCTION(MaybeObject*, Runtime_Abort) {
13098 NoHandleAllocation ha(isolate); 13098 NoHandleAllocation ha(isolate);
13099 ASSERT(args.length() == 2); 13099 ASSERT(args.length() == 2);
13100 OS::PrintError("abort: %s\n", 13100 OS::PrintError("abort: %s\n",
13101 reinterpret_cast<char*>(args[0]) + args.smi_at(1)); 13101 reinterpret_cast<char*>(args[0]) + args.smi_at(1));
13102 isolate->PrintStack(); 13102 isolate->PrintStack(stderr);
13103 OS::Abort(); 13103 OS::Abort();
13104 UNREACHABLE(); 13104 UNREACHABLE();
13105 return NULL; 13105 return NULL;
13106 } 13106 }
13107 13107
13108 13108
13109 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) { 13109 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) {
13110 HandleScope scope(isolate); 13110 HandleScope scope(isolate);
13111 ASSERT(args.length() == 1); 13111 ASSERT(args.length() == 1);
13112 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); 13112 CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
13495 // Handle last resort GC and make sure to allow future allocations 13495 // Handle last resort GC and make sure to allow future allocations
13496 // to grow the heap without causing GCs (if possible). 13496 // to grow the heap without causing GCs (if possible).
13497 isolate->counters()->gc_last_resort_from_js()->Increment(); 13497 isolate->counters()->gc_last_resort_from_js()->Increment();
13498 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13498 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13499 "Runtime::PerformGC"); 13499 "Runtime::PerformGC");
13500 } 13500 }
13501 } 13501 }
13502 13502
13503 13503
13504 } } // namespace v8::internal 13504 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698