Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: Source/heap/tests/HeapTest.cpp

Issue 100433005: [oilpan] Rename PauseScope to SafePointScope (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/heap/ThreadState.cpp ('k') | Source/modules/webdatabase/DatabaseThread.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/heap/ThreadState.cpp ('k') | Source/modules/webdatabase/DatabaseThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698