commit | 4cbbe2d8dec6506a415d7524222f8dda6e0a09c8 | [log] [tgz] |
---|---|---|
author | Francois Doray <fdoray@chromium.org> | Thu Nov 08 00:54:58 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Nov 08 00:54:58 2018 |
tree | 9bcbb9e4dd048dd1835ced01eed0c5a62c151e2e | |
parent | 930c435dc98354829a40023fb5f43c6cb046a1f2 [diff] |
Make ScopedTaskEnvironment the first member of QuicHttpProxyBackendStreamTest. The documentation for ScopedTaskEnvironment recommends making it the first member of the test fixture: https://cs.chromium.org/chromium/src/base/test/scoped_task_environment.h?l=54-59&rcl=376db7a96e0287f0d010acd18e7a379d190cac71 We are chaning this particular case because we want to make the constructor of ScopedTaskEnvironment set a global variable that is read by PlatformThread::SetCurrentThreadPriority(). If ScopedTaskEnvironment is initialized late in the test execution, setting this global variable races with a call to PlatfromThread::SetCurrentThreadPriority() on the thread created from this stack: base::(anonymous namespace)::CreateThread base::PlatformThread::CreateWithPriority base::Thread::StartWithOptions net::test::QuicHttpProxyBackendStreamTest::CreateTestBackendProxy net::test::QuicHttpProxyBackendStreamTest::SetUp Bug: 902441 Change-Id: I4869410f43383bd7f94f68fc7790e3305f3d1b4a Reviewed-on: https://chromium-review.googlesource.com/c/1320654 Commit-Queue: François Doray <fdoray@chromium.org> Reviewed-by: Ryan Hamilton <rch@chromium.org> Cr-Commit-Position: refs/heads/master@{#606259}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .