summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_tests.cc
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 18:05:11 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 18:05:11 +0000
commit29c5d23eeb86edb8a1ca8a97fb56b0a2e698b759 (patch)
treebf9fe5f567e6fe59eeb8ee980b39dbb258e106ce /ipc/ipc_tests.cc
parent1c0e5732ac1faa5bf69dcd2cae5e91ac52b3fbf0 (diff)
downloadchromium_src-29c5d23eeb86edb8a1ca8a97fb56b0a2e698b759.zip
chromium_src-29c5d23eeb86edb8a1ca8a97fb56b0a2e698b759.tar.gz
chromium_src-29c5d23eeb86edb8a1ca8a97fb56b0a2e698b759.tar.bz2
Fix IPC OnChannelConnected() to send correct PID on Linux/CrOS
Sandboxed renderers on Linux/CrOS are in a PID namespace, so they don't know their own global PID. Thus the PID sent in the IPC channel Hello message contains an unexpected value, which is used in the OnChannelConnected() callback into chrome. This causes problems like the Task Manager not showing any data for FPS, JavaScript memory and image cache memory. The task manager is attempting to use the PID/process handle from BrowserMessageFilter, which got it from IPC::Channel::Listener::OnChannelConnected(), and it doesn't match the global PID of each renderer. BUG=70179 TEST=manual, open a few tabs, then open task manager, right-click to turn on JavaScript memory and image memory. Verify there are non-zero values for FPS, JavaScript memory, image cache memory Review URL: http://codereview.chromium.org/7661004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_tests.cc')
-rw-r--r--ipc/ipc_tests.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/ipc_tests.cc b/ipc/ipc_tests.cc
index 2727681..7e808a7 100644
--- a/ipc/ipc_tests.cc
+++ b/ipc/ipc_tests.cc
@@ -251,7 +251,8 @@ TEST_F(IPCChannelTest, ChannelProxyTest) {
{
// setup IPC channel proxy
IPC::ChannelProxy chan(kTestClientChannel, IPC::Channel::MODE_SERVER,
- &channel_listener, thread.message_loop_proxy());
+ &channel_listener, thread.message_loop_proxy(),
+ false /* needs_override_peer_pid */);
channel_listener.Init(&chan);