Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 2624613003: content: Change how a bad message from a child is logged. (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_child_process_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index b6ead8ebb72557f130f8a34a62b4588faba8c9ce..b434c7d011e05f0bc8fc94be70814a45ae4e08f5 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -691,6 +691,7 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
void GpuProcessHost::OnAcceleratedSurfaceCreatedChildWindow(
gpu::SurfaceHandle parent_handle,
gpu::SurfaceHandle window_handle) {
+ constexpr char kBadMessageError[] = "Bad parenting request from gpu process.";
if (!in_process_) {
DCHECK(process_);
{
@@ -698,8 +699,7 @@ void GpuProcessHost::OnAcceleratedSurfaceCreatedChildWindow(
DWORD thread_id = GetWindowThreadProcessId(parent_handle, &process_id);
if (!thread_id || process_id != ::GetCurrentProcessId()) {
- process_->TerminateOnBadMessageReceived(
- GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID);
+ process_->TerminateOnBadMessageReceived(kBadMessageError);
return;
}
}
@@ -709,8 +709,7 @@ void GpuProcessHost::OnAcceleratedSurfaceCreatedChildWindow(
DWORD thread_id = GetWindowThreadProcessId(window_handle, &process_id);
if (!thread_id || process_id != process_->GetProcess().Pid()) {
- process_->TerminateOnBadMessageReceived(
- GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID);
+ process_->TerminateOnBadMessageReceived(kBadMessageError);
return;
}
}
@@ -718,8 +717,7 @@ void GpuProcessHost::OnAcceleratedSurfaceCreatedChildWindow(
if (!gfx::RenderingWindowManager::GetInstance()->RegisterChild(
parent_handle, window_handle)) {
- process_->TerminateOnBadMessageReceived(
- GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID);
+ process_->TerminateOnBadMessageReceived(kBadMessageError);
}
}
#endif
« no previous file with comments | « content/browser/browser_child_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698