Commit 006b75cf authored by jbauman's avatar jbauman Committed by Commit bot

Fix child window checks for single-process mode.

process_->GetProcess() will fail in this case, so don't bother with these checks. In this case they don't matter because the GPU isn't being sandboxed anyway.

BUG=580921

Review URL: https://codereview.chromium.org/1638623002

Cr-Commit-Position: refs/heads/master@{#371704}
parent e18e3b2c
...@@ -632,25 +632,28 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) { ...@@ -632,25 +632,28 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
void GpuProcessHost::OnAcceleratedSurfaceCreatedChildWindow( void GpuProcessHost::OnAcceleratedSurfaceCreatedChildWindow(
const gfx::PluginWindowHandle& parent_handle, const gfx::PluginWindowHandle& parent_handle,
const gfx::PluginWindowHandle& window_handle) { const gfx::PluginWindowHandle& window_handle) {
DCHECK(process_); if (!in_process_) {
{ DCHECK(process_);
DWORD process_id = 0; {
DWORD thread_id = GetWindowThreadProcessId(parent_handle, &process_id); DWORD process_id = 0;
DWORD thread_id = GetWindowThreadProcessId(parent_handle, &process_id);
if (!thread_id || process_id != ::GetCurrentProcessId()) {
process_->TerminateOnBadMessageReceived( if (!thread_id || process_id != ::GetCurrentProcessId()) {
GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID); process_->TerminateOnBadMessageReceived(
return; GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID);
return;
}
} }
}
{
DWORD process_id = 0;
DWORD thread_id = GetWindowThreadProcessId(window_handle, &process_id);
if (!thread_id || process_id != process_->GetProcess().Pid()) { {
process_->TerminateOnBadMessageReceived( DWORD process_id = 0;
GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID); DWORD thread_id = GetWindowThreadProcessId(window_handle, &process_id);
return;
if (!thread_id || process_id != process_->GetProcess().Pid()) {
process_->TerminateOnBadMessageReceived(
GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID);
return;
}
} }
} }
......
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