Fix flakiness in HeadlessBrowserTest
In HeadlessContentMainDelegate::RunProcess(), if the headless browser instance is destroyed before browser runner is shut down, GPU clients might end up accessing the destroyed object in the meantime. An example is when a client tries to establish a GPU channel ending up accessing destroyed HeadlessBrowserImpl::options in order to instantiate viz::GpuHostImpl. This CL changes the ordering to fix the race condition. BUG=881211 TEST=headless_browsertests --gtest_filter=HeadlessBrowserTest.* Change-Id: I2518eeefcc1e446a59d680fa78eab88e26765404 Reviewed-on: https://chromium-review.googlesource.com/1251331Reviewed-by:Sami Kyöstilä <skyostil@chromium.org> Commit-Queue: Mohsen Izadi <mohsen@chromium.org> Cr-Commit-Position: refs/heads/master@{#595465}
Showing
Please register or sign in to comment