Fix dangling ptr in RenderProcessHostTaskProvider (fixes #3758)
This commit is contained in:
parent
8929b36b73
commit
31668f9570
|
@ -744,5 +744,11 @@ patches = [
|
||||||
# Windows: Add missing check in base/profiler/stack_copier.cc to fix
|
# Windows: Add missing check in base/profiler/stack_copier.cc to fix
|
||||||
# compilation error of cef_sandbox.
|
# compilation error of cef_sandbox.
|
||||||
'name': 'win_sandbox_stack_copier'
|
'name': 'win_sandbox_stack_copier'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
# Fix dangling RenderProcessHost ptr in RenderProcessHostTaskProvider.
|
||||||
|
# https://github.com/chromiumembedded/cef/issues/3758
|
||||||
|
# https://chromium-review.googlesource.com/c/chromium/src/+/5894650
|
||||||
|
'name': 'chrome_browser_task_manager_5894650'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
diff --git chrome/browser/task_manager/providers/render_process_host_task_provider.cc chrome/browser/task_manager/providers/render_process_host_task_provider.cc
|
||||||
|
index 11b05cbfc6077..45a5b11158a21 100644
|
||||||
|
--- chrome/browser/task_manager/providers/render_process_host_task_provider.cc
|
||||||
|
+++ chrome/browser/task_manager/providers/render_process_host_task_provider.cc
|
||||||
|
@@ -110,18 +110,14 @@ void RenderProcessHostTaskProvider::OnRenderProcessHostCreated(
|
||||||
|
void RenderProcessHostTaskProvider::RenderProcessExited(
|
||||||
|
content::RenderProcessHost* host,
|
||||||
|
const content::ChildProcessTerminationInfo& info) {
|
||||||
|
- if (is_updating_) {
|
||||||
|
- DeleteTask(host->GetID());
|
||||||
|
- host_observation_.RemoveObservation(host);
|
||||||
|
- }
|
||||||
|
+ DeleteTask(host->GetID());
|
||||||
|
+ host_observation_.RemoveObservation(host);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderProcessHostTaskProvider::RenderProcessHostDestroyed(
|
||||||
|
content::RenderProcessHost* host) {
|
||||||
|
- if (is_updating_) {
|
||||||
|
- DeleteTask(host->GetID());
|
||||||
|
- host_observation_.RemoveObservation(host);
|
||||||
|
- }
|
||||||
|
+ DeleteTask(host->GetID());
|
||||||
|
+ host_observation_.RemoveObservation(host);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace task_manager
|
Loading…
Reference in New Issue