• Maggie Chen's avatar
    Fix a GPU watchdog V2 DCHECK in GPU initialization · 2f859102
    Maggie Chen authored
    A DCHECK is triggered in GpuWatchdogThreadImplV2::Arm() during GPU
    initialization. Whenever there is an error, GpuInit::InitializeAndStartSandbox()
    exits earlier. watchdog_thread_->OnInitComplete() is not called in those cases
    and arm_disarm_counter_ gets messed up.
    A new class GpuWatchdogInit is created to call OnInitcomplete() in the destructor.
    OnInitComplete() will never be missed at the end of InitializeAndStartSandbox().
    
    Bug:949839, 995372
    
    Change-Id: I1a107df0ca48409ff2252260ea41de643fa39b6c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762879Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
    Commit-Queue: Maggie Chen <magchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#689343}
    2f859102
gpu_init.cc 22.5 KB