OLD | NEW |
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 14257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14268 | 14268 |
14269 const char* version_string = v8::V8::GetVersion(); | 14269 const char* version_string = v8::V8::GetVersion(); |
14270 | 14270 |
14271 return isolate->heap()->AllocateStringFromOneByte(CStrVector(version_string), | 14271 return isolate->heap()->AllocateStringFromOneByte(CStrVector(version_string), |
14272 NOT_TENURED); | 14272 NOT_TENURED); |
14273 } | 14273 } |
14274 | 14274 |
14275 | 14275 |
14276 RUNTIME_FUNCTION(MaybeObject*, Runtime_Abort) { | 14276 RUNTIME_FUNCTION(MaybeObject*, Runtime_Abort) { |
14277 SealHandleScope shs(isolate); | 14277 SealHandleScope shs(isolate); |
14278 ASSERT(args.length() == 2); | 14278 ASSERT(args.length() == 1); |
14279 OS::PrintError("abort: %s\n", | 14279 CONVERT_SMI_ARG_CHECKED(message_id, 0); |
14280 reinterpret_cast<char*>(args[0]) + args.smi_at(1)); | 14280 const char* message = GetBailoutReason( |
| 14281 static_cast<BailoutReason>(message_id)); |
| 14282 OS::PrintError("abort: %s\n", message); |
14281 isolate->PrintStack(stderr); | 14283 isolate->PrintStack(stderr); |
14282 OS::Abort(); | 14284 OS::Abort(); |
14283 UNREACHABLE(); | 14285 UNREACHABLE(); |
14284 return NULL; | 14286 return NULL; |
14285 } | 14287 } |
14286 | 14288 |
14287 | 14289 |
14288 RUNTIME_FUNCTION(MaybeObject*, Runtime_AbortJS) { | 14290 RUNTIME_FUNCTION(MaybeObject*, Runtime_AbortJS) { |
14289 HandleScope scope(isolate); | 14291 HandleScope scope(isolate); |
14290 ASSERT(args.length() == 1); | 14292 ASSERT(args.length() == 1); |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14889 // Handle last resort GC and make sure to allow future allocations | 14891 // Handle last resort GC and make sure to allow future allocations |
14890 // to grow the heap without causing GCs (if possible). | 14892 // to grow the heap without causing GCs (if possible). |
14891 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14893 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14892 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14894 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14893 "Runtime::PerformGC"); | 14895 "Runtime::PerformGC"); |
14894 } | 14896 } |
14895 } | 14897 } |
14896 | 14898 |
14897 | 14899 |
14898 } } // namespace v8::internal | 14900 } } // namespace v8::internal |
OLD | NEW |