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

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

Issue 2701513003: Revert of 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);
299 m_state->heap().resume(); 298 m_state->heap().resume();
300 } 299 }
301 } 300 }
302 301
303 private: 302 private:
304 ThreadState* m_state; 303 ThreadState* m_state;
305 SafePointScope m_safePointScope; 304 SafePointScope m_safePointScope;
306 bool m_parkedAllThreads; // False if we fail to park all threads 305 bool m_parkedAllThreads; // False if we fail to park all threads
307 }; 306 };
308 307
(...skipping 6259 matching lines...) Expand 10 before | Expand all | Expand 10 after
6568 "HeapVector"); 6567 "HeapVector");
6569 static_assert( 6568 static_assert(
6570 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, 6569 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value,
6571 "HeapDeque"); 6570 "HeapDeque");
6572 static_assert(WTF::IsGarbageCollectedType< 6571 static_assert(WTF::IsGarbageCollectedType<
6573 HeapTerminatedArray<Member<IntWrapper>>>::value, 6572 HeapTerminatedArray<Member<IntWrapper>>>::value,
6574 "HeapTerminatedArray"); 6573 "HeapTerminatedArray");
6575 } 6574 }
6576 6575
6577 } // namespace blink 6576 } // 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