• Eric Karl's avatar
    OOP-D: Fix deadlock during Viz thread shutdown · 23af711f
    Eric Karl authored
    Currently, VizMainImpl::ExitProcess has a workaround to avoid deadlock
    when shutting down the gpu process. Unfortunately, this is only wired up
    to one of the ways to shut down. Other shutdown calls originating from
    ChildProcessImpl miss this logic and hit the same deadlock.
    
    This change passes a helper to ChildProcessImpl, allowing it to correctly
    handle shutdown. This helper posts a task to the GPU main thread before
    starting shutdown to ensure both that we're on the right thread as well
    as that we're post-init.
    
    Bug: 901396
    Change-Id: I58cff914def5c05f7b9e6b6f58cb319153d685dd
    Reviewed-on: https://chromium-review.googlesource.com/c/1315538Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
    Reviewed-by: default avatarkylechar <kylechar@chromium.org>
    Commit-Queue: Eric Karl <ericrk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#605043}
    23af711f
gpu_child_thread.cc 13.5 KB