Commit 83666474 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

PM: Fix crash on GPU process exit notifications.

Bug: 936828
Change-Id: I9ed609c5ca0bf8d9c7e38d25393af8ebbbbc2060
Reviewed-on: https://chromium-review.googlesource.com/c/1494895
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636484}
parent 82a817fe
...@@ -61,10 +61,13 @@ void BrowserChildProcessWatcher::BrowserChildProcessKilled( ...@@ -61,10 +61,13 @@ void BrowserChildProcessWatcher::BrowserChildProcessKilled(
} }
void BrowserChildProcessWatcher::GPUProcessExited(int id, int exit_code) { void BrowserChildProcessWatcher::GPUProcessExited(int id, int exit_code) {
DCHECK(base::ContainsKey(gpu_process_nodes_, id)); // It appears the exit code can be delivered either after the host is
// disconnected, or perhaps before the HostConnected notification,
auto* process_node = gpu_process_nodes_[id].get(); // specifically on crash.
process_node->SetProcessExitStatus(exit_code); if (base::ContainsKey(gpu_process_nodes_, id)) {
auto* process_node = gpu_process_nodes_[id].get();
process_node->SetProcessExitStatus(exit_code);
}
} }
} // namespace performance_manager } // namespace performance_manager
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment