diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-05-15 19:01:14 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-08 09:58:06 +0200 |
commit | e6b83b4600b86bd866aee6b797d9ab6a29c54a92 (patch) | |
tree | dcf6dd64fc9b74f2ac407357bceb508173ea62cc | |
parent | b7af99ff2c6f5e253b305cbecc4aec2eb9624f39 (diff) | |
download | qtwebengine-chromium-e6b83b4600b86bd866aee6b797d9ab6a29c54a92.tar.gz |
Fix race condition on gpu thread initialization
If browser io thread cleans up iself before
gpu thread get fully initalize, it will end up in
crash due to premature resourse release.
Make sure the in_process_gpu_thread is started,
before running thread termination.
Task-number: QTBUG-68293
Change-Id: I2940c86aaacb8a9ab634b5cdae1c8614dda23b44
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
-rw-r--r-- | chromium/content/browser/gpu/gpu_process_host.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chromium/content/browser/gpu/gpu_process_host.cc b/chromium/content/browser/gpu/gpu_process_host.cc index 8ed00b672ac..0e4ae429da5 100644 --- a/chromium/content/browser/gpu/gpu_process_host.cc +++ b/chromium/content/browser/gpu/gpu_process_host.cc @@ -683,6 +683,9 @@ GpuProcessHost::~GpuProcessHost() { } } + if (in_process_) + in_process_gpu_thread_->WaitUntilThreadStarted(); + // If there are any remaining offscreen contexts at the point the // GPU process exits, assume something went wrong, and block their // URLs from accessing client 3D APIs without prompting. |