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 1866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1877 }; | 1877 }; |
1878 | 1878 |
1879 DEFINE_GC_INFO(SimpleObject); | 1879 DEFINE_GC_INFO(SimpleObject); |
1880 | 1880 |
1881 class TestGCScope { | 1881 class TestGCScope { |
1882 public: | 1882 public: |
1883 TestGCScope() | 1883 TestGCScope() |
1884 : m_state(ThreadState::Current()) | 1884 : m_state(ThreadState::Current()) |
1885 { | 1885 { |
1886 m_state->checkThread(); | 1886 m_state->checkThread(); |
1887 ASSERT(m_state->isPaused() == m_state->isInGC()); | 1887 ASSERT(m_state->isInSafePoint() == m_state->isInGC()); |
1888 if (!m_state->isInGC()) | 1888 if (!m_state->isInGC()) |
1889 ThreadState::stopThreads(ThreadState::HeapPointersOnStack); | 1889 ThreadState::stopThreads(ThreadState::HeapPointersOnStack); |
1890 m_state->enterGC(); | 1890 m_state->enterGC(); |
1891 Heap::makeConsistentForGC(); | 1891 Heap::makeConsistentForGC(); |
1892 } | 1892 } |
1893 | 1893 |
1894 ~TestGCScope() | 1894 ~TestGCScope() |
1895 { | 1895 { |
1896 m_state->leaveGC(); | 1896 m_state->leaveGC(); |
1897 if (!m_state->isInGC()) | 1897 if (!m_state->isInGC()) |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2807 { | 2807 { |
2808 HeapTester::checkAndVisitPointer(); | 2808 HeapTester::checkAndVisitPointer(); |
2809 } | 2809 } |
2810 | 2810 |
2811 TEST(heap, HeapCollectionWithFinalizers) | 2811 TEST(heap, HeapCollectionWithFinalizers) |
2812 { | 2812 { |
2813 HeapTester::heapCollectionWithFinalizers(); | 2813 HeapTester::heapCollectionWithFinalizers(); |
2814 } | 2814 } |
2815 | 2815 |
2816 } // namespace WebCore | 2816 } // namespace WebCore |
OLD | NEW |