summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gpu_channel.cc
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 05:18:29 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 05:18:29 +0000
commit0ba066afc32abc8d44d0e1dcf409f2f39250a00a (patch)
tree9e9747f165149aa4a15fcfd6d233d1f94451e4a7 /content/common/gpu/gpu_channel.cc
parent83a43d9f5a7ebde2bdcc6f6012d92c79adb6e439 (diff)
downloadchromium_src-0ba066afc32abc8d44d0e1dcf409f2f39250a00a.zip
chromium_src-0ba066afc32abc8d44d0e1dcf409f2f39250a00a.tar.gz
chromium_src-0ba066afc32abc8d44d0e1dcf409f2f39250a00a.tar.bz2
Add more CHECK in GPU and NPAPI process on invalid file descriptors
Goes with r112647, where we added CHECKs for invalid file descriptors. Regarding the GPU process, we already have a crash in GpuChannelManager::OnEstablishChannel() function due to invalid renderer fd. But it's not clear whether this is due to channel reuse or failure in creating channel in server mode. Talked to apatrick@ and the reuse one should never happen in normal case. Adding check on that case so we can hopefully rule out that case. Regarding the NPAPI process, we already have a lot of crashes due to invalid file descriptors in the rederer. In NPAPI process, add a CHECK right after the channel is created in server mode to see where this invalid fd originates from. BUG=none TEST=passed unit tests Review URL: http://codereview.chromium.org/8877001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_channel.cc')
-rw-r--r--content/common/gpu/gpu_channel.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index e8cc269..52fab1a 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -431,8 +431,11 @@ void GpuChannel::OnCloseChannel() {
bool GpuChannel::Init(base::MessageLoopProxy* io_message_loop,
base::WaitableEvent* shutdown_event) {
// Check whether we're already initialized.
- if (channel_.get())
+ if (channel_.get()) {
+ // TODO(xhwang): Added to investigate crbug.com/95732. Clean up after fixed.
+ CHECK(false);
return true;
+ }
// Map renderer ID to a (single) channel to that process.
std::string channel_name = GetChannelName();