summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 17:01:36 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 17:01:36 +0000
commit6c6cc80b2463e75d94ebb0d392ccf54761374a64 (patch)
tree027e484cadfabddc197efe4ccab1567bc6cb9b0f /chrome/plugin
parentded5e4e7e6bc7c7d4d16223929dbb0f69fc8add0 (diff)
downloadchromium_src-6c6cc80b2463e75d94ebb0d392ccf54761374a64.zip
chromium_src-6c6cc80b2463e75d94ebb0d392ccf54761374a64.tar.gz
chromium_src-6c6cc80b2463e75d94ebb0d392ccf54761374a64.tar.bz2
Make OpenProcessHandle report an error when it couldn't open the handle.
One more step to land http://codereview.chromium.org/54003 (chrome_process_util). Review URL: http://codereview.chromium.org/62004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/plugin_channel.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc
index 066bda3..1c6a809 100644
--- a/chrome/plugin/plugin_channel.cc
+++ b/chrome/plugin/plugin_channel.cc
@@ -100,7 +100,11 @@ int PluginChannel::GenerateRouteID() {
}
void PluginChannel::OnChannelConnected(int32 peer_pid) {
- renderer_handle_.Set(base::OpenProcessHandle(peer_pid));
+ base::ProcessHandle handle;
+ if (!base::OpenProcessHandle(peer_pid, &handle)) {
+ NOTREACHED();
+ }
+ renderer_handle_.Set(handle);
PluginChannelBase::OnChannelConnected(peer_pid);
}