Backout 23ee84dbd7b5
authorChris Jones <jones.chris.g@gmail.com>
Tue, 26 Jan 2010 20:08:22 -0600
changeset 46597 1a9fa9afbcdabdce1ed4332d7eb878b45b1e3d2f
parent 46588 23ee84dbd7b5566e09cd21747b68d17be243da94
child 46598 c349f2f6cfc705d8e5321f2d8e0ee6f8c692a353
push idunknown
push userunknown
push dateunknown
milestone1.9.3a1pre
backs out23ee84dbd7b5566e09cd21747b68d17be243da94
Backout 23ee84dbd7b5
ipc/chromium/src/base/thread.cc
ipc/chromium/src/chrome/common/child_process.cc
ipc/chromium/src/chrome/common/ipc_channel_posix.cc
ipc/glue/AsyncChannel.cpp
toolkit/xre/nsEmbedFunctions.cpp
--- a/ipc/chromium/src/base/thread.cc
+++ b/ipc/chromium/src/base/thread.cc
@@ -97,61 +97,27 @@ bool Thread::StartWithOptions(const Opti
 void Thread::Stop() {
   if (!thread_was_started())
     return;
 
   // We should only be called on the same thread that started us.
   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.
   //
   // 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;
 
   // The thread no longer needs to be joined.
   startup_data_ = NULL;
 }
 
 void Thread::StopSoon() {
--- a/ipc/chromium/src/chrome/common/child_process.cc
+++ b/ipc/chromium/src/chrome/common/child_process.cc
@@ -24,38 +24,19 @@ ChildProcess::~ChildProcess() {
   DCHECK(child_process_ == this);
 
   // Signal this event before destroying the child process.  That way all
   // background threads can cleanup.
   // For example, in the renderer the RenderThread instances will be able to
   // 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;
 }
 
 void ChildProcess::AddRefProcess() {
   DCHECK(!child_thread_.get() ||  // null in unittests.
          MessageLoop::current() == child_thread_->message_loop());
   ref_count_++;
 }
--- a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
+++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
@@ -376,25 +376,16 @@ bool Channel::ChannelImpl::ProcessIncomi
       if (bytes_read < 0) {
         if (errno == EAGAIN) {
           return true;
         } else {
           LOG(ERROR) << "pipe error (" << pipe_ << "): " << strerror(errno);
           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;
       }
     }
     DCHECK(bytes_read);
 
     if (client_pipe_ != -1) {
@@ -701,30 +692,17 @@ void Channel::ChannelImpl::OnFileCanRead
 
     waiting_connect_ = false;
     send_server_hello_msg = true;
   }
 
   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());
-
-
     }
   }
 
   // If we're a server and handshaking, then we want to make sure that we
   // only send our handshake message after we've processed the client's.
   // This gives us a chance to kill the client if the incoming handshake
   // is invalid.
   if (send_server_hello_msg) {
@@ -732,65 +710,30 @@ void Channel::ChannelImpl::OnFileCanRead
     DCHECK(is_blocked_on_write_ == false);
     ProcessOutgoingMessages();
   }
 }
 
 // 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());
-
-
-
   }
 }
 
 void Channel::ChannelImpl::Close() {
   // Close can be called multiple time, so we need to make sure we're
   // idempotent.
 
   // Unregister libevent for the listening socket and close it.
   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;
   }
 
   // Unregister libevent for the FIFO and close it.
   read_watcher_.StopWatchingFileDescriptor();
   write_watcher_.StopWatchingFileDescriptor();
   if (pipe_ != -1) {
     HANDLE_EINTR(close(pipe_));
--- a/ipc/glue/AsyncChannel.cpp
+++ b/ipc/glue/AsyncChannel.cpp
@@ -68,25 +68,16 @@ AsyncChannel::AsyncChannel(AsyncListener
     mChannelErrorTask(NULL)
 {
     MOZ_COUNT_CTOR(AsyncChannel);
 }
 
 AsyncChannel::~AsyncChannel()
 {
     MOZ_COUNT_DTOR(AsyncChannel);
-
-
-
-#ifdef OS_LINUX
-        printf("TEST-UNEXPECTED-FAIL | process %d | ~AsyncChannel()\n", getpid());
-#endif
-
-
-
     Clear();
 }
 
 bool
 AsyncChannel::Open(Transport* aTransport, MessageLoop* aIOLoop)
 {
     NS_PRECONDITION(!mTransport, "Open() called > once");
     NS_PRECONDITION(aTransport, "need transport layer");
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -363,24 +363,16 @@ XRE_InitChildProcess(int aArgc,
 
     ChildProcess process(mainThread);
 
     // Do IPC event loop
     sIOMessageLoop = MessageLoop::current();
 
     sIOMessageLoop->Run();
 
-
-
-#ifdef OS_LINUX
-    printf("TEST-UNEXPECTED-FAIL | plugin process %d | broke out of IO event loop\n", getpid());
-#endif
-
-
-
     sIOMessageLoop = nsnull;
   }
 
 
 #ifdef OS_LINUX
   printf("TEST-UNEXPECTED-FAIL | plugin process %d | IO thread joined XPCOM thread, exiting\n", getpid());
 #endif