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

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

Issue 2686533003: Move postGC out of CrossThreadPersistentRegion::LockScope (Closed)
Patch Set: fix 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 namespace blink { 276 namespace blink {
277 277
278 class TestGCScope { 278 class TestGCScope {
279 public: 279 public:
280 explicit TestGCScope(BlinkGC::StackState state) 280 explicit TestGCScope(BlinkGC::StackState state)
281 : m_state(ThreadState::current()), m_safePointScope(state) { 281 : m_state(ThreadState::current()), m_safePointScope(state) {
282 ASSERT(m_state->checkThread()); 282 ASSERT(m_state->checkThread());
283 m_state->heap().preGC(); 283 m_state->heap().preGC();
284 } 284 }
285 285
286 ~TestGCScope() { m_state->heap().postGC(BlinkGC::GCWithSweep); } 286 ~TestGCScope() {
287 m_state->heap().postGC(BlinkGC::GCWithSweep);
288 m_state->heap().preSweep(BlinkGC::GCWithSweep);
289 }
287 290
288 private: 291 private:
289 ThreadState* m_state; 292 ThreadState* m_state;
290 SafePointScope m_safePointScope; 293 SafePointScope m_safePointScope;
291 }; 294 };
292 295
293 class SimpleObject : public GarbageCollected<SimpleObject> { 296 class SimpleObject : public GarbageCollected<SimpleObject> {
294 public: 297 public:
295 static SimpleObject* create() { return new SimpleObject(); } 298 static SimpleObject* create() { return new SimpleObject(); }
296 DEFINE_INLINE_TRACE() {} 299 DEFINE_INLINE_TRACE() {}
(...skipping 6062 matching lines...) Expand 10 before | Expand all | Expand 10 after
6359 "HeapVector"); 6362 "HeapVector");
6360 static_assert( 6363 static_assert(
6361 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, 6364 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value,
6362 "HeapDeque"); 6365 "HeapDeque");
6363 static_assert(WTF::IsGarbageCollectedType< 6366 static_assert(WTF::IsGarbageCollectedType<
6364 HeapTerminatedArray<Member<IntWrapper>>>::value, 6367 HeapTerminatedArray<Member<IntWrapper>>>::value,
6365 "HeapTerminatedArray"); 6368 "HeapTerminatedArray");
6366 } 6369 }
6367 6370
6368 } // namespace blink 6371 } // 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