• Tobias Sargeant's avatar
    [aw] Fix a race associated with terminating a WebView renderer. · bac34b43
    Tobias Sargeant authored
    Race condition is caused by RenderProcessHost::Shutdown recreating the
    sync IPC channel and asynchronously causing SyncContext::OnChannelOpened
    to be called on the IO thread.
    
    In the interim the RPH has been deleted, causing the WaitableEvent that
    was passed to the SyncContext to be destroyed before it is used.
    
    Because we never intend to use the WaitableEvent to signal shutdown in
    WebView, it's simplest to just pass null for the shutdown_event,
    indicating that the caller never intends to signal shutdown.
    
    Bug: 904043,865062
    Change-Id: I69a51adc78a0f1c0d6f84fbb7206fc9d58e69ed2
    Reviewed-on: https://chromium-review.googlesource.com/c/1329670
    Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
    Reviewed-by: default avatarKen Rockot <rockot@google.com>
    Reviewed-by: default avatarBo <boliu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#607343}
    bac34b43
ipc_sync_channel.cc 25.8 KB