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

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 2690943009: Move postGC out of CrossThreadPersistentRegion::LockScope (Closed)
Patch Set: Created 3 years, 10 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
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 } 289 }
290 290
291 bool allThreadsParked() { return m_parkedAllThreads; } 291 bool allThreadsParked() { return m_parkedAllThreads; }
292 292
293 ~TestGCScope() { 293 ~TestGCScope() {
294 // Only cleanup if we parked all threads in which case the GC happened 294 // Only cleanup if we parked all threads in which case the GC happened
295 // and we need to resume the other threads. 295 // and we need to resume the other threads.
296 if (LIKELY(m_parkedAllThreads)) { 296 if (LIKELY(m_parkedAllThreads)) {
297 m_state->heap().postGC(BlinkGC::GCWithSweep); 297 m_state->heap().postGC(BlinkGC::GCWithSweep);
298 m_state->heap().preSweep(BlinkGC::GCWithSweep);
298 m_state->heap().resume(); 299 m_state->heap().resume();
299 } 300 }
300 } 301 }
301 302
302 private: 303 private:
303 ThreadState* m_state; 304 ThreadState* m_state;
304 SafePointScope m_safePointScope; 305 SafePointScope m_safePointScope;
305 bool m_parkedAllThreads; // False if we fail to park all threads 306 bool m_parkedAllThreads; // False if we fail to park all threads
306 }; 307 };
307 308
(...skipping 6259 matching lines...) Expand 10 before | Expand all | Expand 10 after
6567 "HeapVector"); 6568 "HeapVector");
6568 static_assert( 6569 static_assert(
6569 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, 6570 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value,
6570 "HeapDeque"); 6571 "HeapDeque");
6571 static_assert(WTF::IsGarbageCollectedType< 6572 static_assert(WTF::IsGarbageCollectedType<
6572 HeapTerminatedArray<Member<IntWrapper>>>::value, 6573 HeapTerminatedArray<Member<IntWrapper>>>::value,
6573 "HeapTerminatedArray"); 6574 "HeapTerminatedArray");
6574 } 6575 }
6575 6576
6576 } // namespace blink 6577 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698