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

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

Issue 1638623002: Fix child window checks for single-process mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | 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 ad9cafeba40a9b096cb1ce6a1ad266606494d694..cd91c0f6faead56e6da27403ad20dade9958f0da 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -636,25 +636,28 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
void GpuProcessHost::OnAcceleratedSurfaceCreatedChildWindow(
const gfx::PluginWindowHandle& parent_handle,
const gfx::PluginWindowHandle& window_handle) {
- DCHECK(process_);
- {
- DWORD process_id = 0;
- DWORD thread_id = GetWindowThreadProcessId(parent_handle, &process_id);
-
- if (!thread_id || process_id != ::GetCurrentProcessId()) {
- process_->TerminateOnBadMessageReceived(
- GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID);
- return;
+ if (!in_process_) {
+ DCHECK(process_);
+ {
+ DWORD process_id = 0;
+ DWORD thread_id = GetWindowThreadProcessId(parent_handle, &process_id);
+
+ if (!thread_id || process_id != ::GetCurrentProcessId()) {
+ process_->TerminateOnBadMessageReceived(
+ 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(
- 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(
+ GpuHostMsg_AcceleratedSurfaceCreatedChildWindow::ID);
+ return;
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698