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 5986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5997 FLAG_gc_interval = -1; | 5997 FLAG_gc_interval = -1; |
5998 CcTest::InitializeVM(); | 5998 CcTest::InitializeVM(); |
5999 v8::HandleScope scope(CcTest::isolate()); | 5999 v8::HandleScope scope(CcTest::isolate()); |
6000 v8::TryCatch try_catch(CcTest::isolate()); | 6000 v8::TryCatch try_catch(CcTest::isolate()); |
6001 CompileRun("throw new Error();"); | 6001 CompileRun("throw new Error();"); |
6002 CHECK(try_catch.HasCaught()); | 6002 CHECK(try_catch.HasCaught()); |
6003 Isolate* isolate = CcTest::i_isolate(); | 6003 Isolate* isolate = CcTest::i_isolate(); |
6004 Handle<Object> exception = v8::Utils::OpenHandle(*try_catch.Exception()); | 6004 Handle<Object> exception = v8::Utils::OpenHandle(*try_catch.Exception()); |
6005 Handle<Name> key = isolate->factory()->stack_trace_symbol(); | 6005 Handle<Name> key = isolate->factory()->stack_trace_symbol(); |
6006 Handle<Object> stack_trace = | 6006 Handle<Object> stack_trace = |
6007 JSObject::GetProperty(exception, key).ToHandleChecked(); | 6007 Object::GetProperty(exception, key).ToHandleChecked(); |
6008 Handle<Object> code = | 6008 Handle<Object> code = |
6009 Object::GetElement(isolate, stack_trace, 3).ToHandleChecked(); | 6009 Object::GetElement(isolate, stack_trace, 3).ToHandleChecked(); |
6010 CHECK(code->IsCode()); | 6010 CHECK(code->IsCode()); |
6011 | 6011 |
6012 isolate->heap()->CollectAllAvailableGarbage("stack trace preprocessing"); | 6012 isolate->heap()->CollectAllAvailableGarbage("stack trace preprocessing"); |
6013 | 6013 |
6014 Handle<Object> pos = | 6014 Handle<Object> pos = |
6015 Object::GetElement(isolate, stack_trace, 3).ToHandleChecked(); | 6015 Object::GetElement(isolate, stack_trace, 3).ToHandleChecked(); |
6016 CHECK(pos->IsSmi()); | 6016 CHECK(pos->IsSmi()); |
6017 | 6017 |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6603 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); | 6603 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); |
6604 } | 6604 } |
6605 } | 6605 } |
6606 // Force allocation from the free list. | 6606 // Force allocation from the free list. |
6607 heap->set_force_oom(true); | 6607 heap->set_force_oom(true); |
6608 heap->CollectGarbage(OLD_SPACE); | 6608 heap->CollectGarbage(OLD_SPACE); |
6609 } | 6609 } |
6610 | 6610 |
6611 } // namespace internal | 6611 } // namespace internal |
6612 } // namespace v8 | 6612 } // namespace v8 |
OLD | NEW |