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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 1771353010: Finish completeSweep before shutting down V8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/HeapTest.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapTest.cpp b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
index 1dcd122125d381e68969bc3e8028abc15bb2ff77..ee21153622f78750302d5dec203d9ad384615811 100644
--- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
@@ -5751,54 +5751,6 @@ TEST(HeapTest, RecursiveMutex)
RecursiveLockingTester::test();
}
-class CrossThreadPersistentOnMainThreadTester {
haraken 2016/03/10 10:45:18 Would it make sense to remove this test?
-public:
- static void test()
- {
- MutexLocker locker(mainThreadMutex());
- OwnPtr<WebThread> workerThread = adoptPtr(Platform::current()->createThread("Test Worker Thread"));
- workerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(workerThreadMain));
-
- parkMainThread();
-
- // (Temporarily) detach main thread and wake the worker thread, so that it
- // can do its detach().
- ThreadState::detachMainThread();
haraken 2016/03/10 10:45:18 It's not allowed to detach the main thread before
- wakeWorkerThread();
-
- parkMainThread();
- ThreadState::attachMainThread();
- }
-
-private:
-
- static void workerThreadMain()
- {
- MutexLocker locker(workerThreadMutex());
-
- // Start up a worker thread and have it detach after the main thread has.
- // Do this to verify that CrossThreadPersistent<>s referring to objects
haraken 2016/03/10 10:45:18 The CrossThreadPersistent is not pointing to an ob
- // on one of the main thread's arenas does not upset the CTP invalidation
- // pass that ThreadState::detach() performs.
- ThreadState::attach();
-
- CrossThreadPersistent<IntWrapper> persistent(IntWrapper::create(43));
-
- // Wait for the main thread to detach.
- wakeMainThread();
- parkWorkerThread();
-
- ThreadState::detach();
- wakeMainThread();
- }
-};
-
-TEST(HeapTest, CrossThreadPersistentOnMainThread)
-{
- CrossThreadPersistent<IntWrapper> persistent(IntWrapper::create(42));
- CrossThreadPersistentOnMainThreadTester::test();
-}
-
template<typename T>
class TraceIfNeededTester : public GarbageCollectedFinalized<TraceIfNeededTester<T>> {
public:
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Initializer.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