Backout 23ee84dbd7b5

This commit is contained in:
Chris Jones 2010-01-26 20:08:22 -06:00
parent 7df4c01b33
commit 833e7c87fc
5 changed files with 2 additions and 129 deletions

View File

@ -102,21 +102,8 @@ void Thread::Stop() {
DCHECK_NE(thread_id_, PlatformThread::CurrentId());
// StopSoon may have already been called.
if (message_loop_) {
#ifdef OS_LINUX
printf("TEST-UNEXPECTED-FAIL | process %d | posted quit task to other thread\n", getpid());
#endif
if (message_loop_)
message_loop_->PostTask(FROM_HERE, new ThreadQuitTask());
}
// Wait for the thread to exit. It should already have terminated but make
// sure this assumption is valid.
@ -124,29 +111,8 @@ void Thread::Stop() {
// TODO(darin): Unfortunately, we need to keep message_loop_ around until
// the thread exits. Some consumers are abusing the API. Make them stop.
//
#ifdef OS_LINUX
printf("TEST-UNEXPECTED-FAIL | process %d | joining other thread\n", getpid());
#endif
PlatformThread::Join(thread_);
#ifdef OS_LINUX
printf("TEST-UNEXPECTED-FAIL | process %d | other thread joined\n", getpid());
#endif
// The thread can't receive messages anymore.
message_loop_ = NULL;

View File

@ -29,28 +29,9 @@ ChildProcess::~ChildProcess() {
// notice shutdown before the render process begins waiting for them to exit.
shutdown_event_.Signal();
if (child_thread_.get()) {
#ifdef OS_LINUX
printf("TEST-UNEXPECTED-FAIL | plugin process %d | IO thread is Stop()ing XPCOM thread\n", getpid());
#endif
if (child_thread_.get())
child_thread_->Stop();
#ifdef OS_LINUX
printf("TEST-UNEXPECTED-FAIL | plugin process %d | XPCOM thread has been Stop()d\n", getpid());
#endif
}
child_process_ = NULL;
}

View File

@ -381,15 +381,6 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() {
return false;
}
} else if (bytes_read == 0) {
printf("TEST-UNEXPECTED-FAIL | process %d | read 0 bytes from pipe, it's closed\n", getpid());
// The pipe has closed...
Close();
return false;
@ -706,20 +697,7 @@ void Channel::ChannelImpl::OnFileCanReadWithoutBlocking(int fd) {
if (!waiting_connect_ && fd == pipe_) {
if (!ProcessIncomingMessages()) {
Close();
printf("TEST-UNEXPECTED-FAIL | process %d | notifying client of channel error (read)\n", getpid());
listener_->OnChannelError();
printf("TEST-UNEXPECTED-FAIL | process %d | client notified(read)\n", getpid());
}
}
@ -737,29 +715,8 @@ void Channel::ChannelImpl::OnFileCanReadWithoutBlocking(int fd) {
// Called by libevent when we can write to the pipe without blocking.
void Channel::ChannelImpl::OnFileCanWriteWithoutBlocking(int fd) {
if (!ProcessOutgoingMessages()) {
printf("TEST-UNEXPECTED-FAIL | process %d | failed to process outgoing messages\n", getpid());
Close();
printf("TEST-UNEXPECTED-FAIL | process %d | notifying client of channel error (write)\n", getpid());
listener_->OnChannelError();
printf("TEST-UNEXPECTED-FAIL | process %d | client notified(write)\n", getpid());
}
}
@ -771,21 +728,7 @@ void Channel::ChannelImpl::Close() {
server_listen_connection_watcher_.StopWatchingFileDescriptor();
if (server_listen_pipe_ != -1) {
printf("TEST-UNEXPECTED-FAIL | process %d | closing pipe\n", getpid());
HANDLE_EINTR(close(server_listen_pipe_));
printf("TEST-UNEXPECTED-FAIL | process %d | pipe closed\n", getpid());
server_listen_pipe_ = -1;
}

View File

@ -73,15 +73,6 @@ AsyncChannel::AsyncChannel(AsyncListener* aListener)
AsyncChannel::~AsyncChannel()
{
MOZ_COUNT_DTOR(AsyncChannel);
#ifdef OS_LINUX
printf("TEST-UNEXPECTED-FAIL | process %d | ~AsyncChannel()\n", getpid());
#endif
Clear();
}

View File

@ -368,14 +368,6 @@ XRE_InitChildProcess(int aArgc,
sIOMessageLoop->Run();
#ifdef OS_LINUX
printf("TEST-UNEXPECTED-FAIL | plugin process %d | broke out of IO event loop\n", getpid());
#endif
sIOMessageLoop = nsnull;
}