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

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

Issue 138273003: Fix TestGCScope in blink_heap_unittests so that it leaves freelists alone. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months 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 | « no previous file | no next file » | 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 30 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698