OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 30 matching lines...) Expand all Loading... |
41 class TestGCScope { | 41 class TestGCScope { |
42 public: | 42 public: |
43 explicit TestGCScope(ThreadState::StackState state) | 43 explicit TestGCScope(ThreadState::StackState state) |
44 : m_state(ThreadState::current()) | 44 : m_state(ThreadState::current()) |
45 , m_safePointScope(state) | 45 , m_safePointScope(state) |
46 { | 46 { |
47 m_state->checkThread(); | 47 m_state->checkThread(); |
48 ASSERT(!m_state->isInGC()); | 48 ASSERT(!m_state->isInGC()); |
49 ThreadState::stopThreads(); | 49 ThreadState::stopThreads(); |
50 m_state->enterGC(); | 50 m_state->enterGC(); |
51 Heap::makeConsistentForGC(); | |
52 } | 51 } |
53 | 52 |
54 ~TestGCScope() | 53 ~TestGCScope() |
55 { | 54 { |
56 m_state->leaveGC(); | 55 m_state->leaveGC(); |
57 ASSERT(!m_state->isInGC()); | 56 ASSERT(!m_state->isInGC()); |
58 ThreadState::resumeThreads(); | 57 ThreadState::resumeThreads(); |
59 } | 58 } |
60 | 59 |
61 private: | 60 private: |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 DEFINE_GC_INFO(ConstructorAllocation); | 1013 DEFINE_GC_INFO(ConstructorAllocation); |
1015 DEFINE_GC_INFO(HeapAllocatedArray); | 1014 DEFINE_GC_INFO(HeapAllocatedArray); |
1016 DEFINE_GC_INFO(IntWrapper); | 1015 DEFINE_GC_INFO(IntWrapper); |
1017 DEFINE_GC_INFO(LargeObject); | 1016 DEFINE_GC_INFO(LargeObject); |
1018 DEFINE_GC_INFO(RefCountedAndGarbageCollected); | 1017 DEFINE_GC_INFO(RefCountedAndGarbageCollected); |
1019 DEFINE_GC_INFO(SimpleFinalizedObject); | 1018 DEFINE_GC_INFO(SimpleFinalizedObject); |
1020 DEFINE_GC_INFO(TestTypedHeapClass); | 1019 DEFINE_GC_INFO(TestTypedHeapClass); |
1021 DEFINE_GC_INFO(TraceCounter); | 1020 DEFINE_GC_INFO(TraceCounter); |
1022 | 1021 |
1023 } // namespace | 1022 } // namespace |
OLD | NEW |