Chromium Code Reviews| 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: |