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 9431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9442 | 9442 |
9443 | 9443 |
9444 RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowNotDateError) { | 9444 RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowNotDateError) { |
9445 HandleScope scope(isolate); | 9445 HandleScope scope(isolate); |
9446 ASSERT(args.length() == 0); | 9446 ASSERT(args.length() == 0); |
9447 return isolate->Throw(*isolate->factory()->NewTypeError( | 9447 return isolate->Throw(*isolate->factory()->NewTypeError( |
9448 "not_date_object", HandleVector<Object>(NULL, 0))); | 9448 "not_date_object", HandleVector<Object>(NULL, 0))); |
9449 } | 9449 } |
9450 | 9450 |
9451 | 9451 |
| 9452 RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowMessage) { |
| 9453 HandleScope scope(isolate); |
| 9454 ASSERT(args.length() == 2); |
| 9455 const char* message = |
| 9456 reinterpret_cast<char*>(args[0]) + args.smi_at(1); |
| 9457 Handle<Name> message_handle = |
| 9458 isolate->factory()->NewStringFromAscii(CStrVector(message)); |
| 9459 return isolate->Throw(*message_handle); |
| 9460 } |
| 9461 |
9452 | 9462 |
9453 RUNTIME_FUNCTION(MaybeObject*, Runtime_StackGuard) { | 9463 RUNTIME_FUNCTION(MaybeObject*, Runtime_StackGuard) { |
9454 SealHandleScope shs(isolate); | 9464 SealHandleScope shs(isolate); |
9455 ASSERT(args.length() == 0); | 9465 ASSERT(args.length() == 0); |
9456 | 9466 |
9457 // First check if this is a real stack overflow. | 9467 // First check if this is a real stack overflow. |
9458 if (isolate->stack_guard()->IsStackOverflow()) { | 9468 if (isolate->stack_guard()->IsStackOverflow()) { |
9459 return isolate->StackOverflow(); | 9469 return isolate->StackOverflow(); |
9460 } | 9470 } |
9461 | 9471 |
(...skipping 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14906 // Handle last resort GC and make sure to allow future allocations | 14916 // Handle last resort GC and make sure to allow future allocations |
14907 // to grow the heap without causing GCs (if possible). | 14917 // to grow the heap without causing GCs (if possible). |
14908 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14918 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14909 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14919 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14910 "Runtime::PerformGC"); | 14920 "Runtime::PerformGC"); |
14911 } | 14921 } |
14912 } | 14922 } |
14913 | 14923 |
14914 | 14924 |
14915 } } // namespace v8::internal | 14925 } } // namespace v8::internal |
OLD | NEW |