Index: message_pump_libevent.cc
===================================================================
--- message_pump_libevent.cc	(revision 7377)
+++ message_pump_libevent.cc	(working copy)
@@ -5,6 +5,7 @@
 #include "base/message_pump_libevent.h"
 
 #include <fcntl.h>
+#include <errno.h>
 
 #include "base/logging.h"
 #include "base/scoped_nsautorelease_pool.h"
@@ -19,7 +20,10 @@
   int flags = fcntl(fd, F_GETFL, 0);
   if (flags == -1)
     flags = 0;
-  return fcntl(fd, F_SETFL, flags | O_NONBLOCK);
+  int rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
+  if (rv)
+    LOG(ERROR) << "fcntl(" << fd << ", F_SETFL,) failed, errno " << errno;
+  return rv;
 }
 
 MessagePumpLibevent::FileDescriptorWatcher::FileDescriptorWatcher()
@@ -81,8 +85,10 @@
 
 bool MessagePumpLibevent::Init() {
   int fds[2];
-  if (pipe(fds))
+  if (pipe(fds)) {
+    LOG(ERROR) << "pipe failed, errno " << errno;
     return false;
+  }
   if (SetNonBlocking(fds[0]))
     return false;
   if (SetNonBlocking(fds[1]))
@@ -95,8 +101,10 @@
             OnWakeup, this);
   event_base_set(event_base_, wakeup_event_);
 
-  if (event_add(wakeup_event_, 0))
+  if (event_add(wakeup_event_, 0)) {
+    LOG(ERROR) << "event_add failed";
     return false;
+  }
   return true;
 }
 
