Index: base/message_pump_glib.cc |
=================================================================== |
--- base/message_pump_glib.cc (revision 4621) |
+++ base/message_pump_glib.cc (working copy) |
@@ -67,10 +67,11 @@ |
flags = 0; |
CHECK(0 == fcntl(read_fd_work_scheduled_, F_SETFL, flags | O_NONBLOCK)) << |
"Could not set file descriptor to non-blocking!"; |
- GPollFD poll_fd; |
- poll_fd.fd = read_fd_work_scheduled_; |
- poll_fd.events = G_IO_IN | G_IO_HUP | G_IO_ERR; |
- work_source_ = AddSource(&WorkSourceFuncs, G_PRIORITY_DEFAULT, &poll_fd); |
+ work_source_poll_info_ = new GPollFD; |
+ work_source_poll_info_->fd = read_fd_work_scheduled_; |
+ work_source_poll_info_->events = G_IO_IN | G_IO_HUP | G_IO_ERR; |
+ work_source_ = AddSource(&WorkSourceFuncs, G_PRIORITY_DEFAULT, |
+ work_source_poll_info_); |
} |
MessagePumpForUI::~MessagePumpForUI() { |
@@ -78,6 +79,7 @@ |
close(write_fd_work_scheduled_); |
g_source_destroy(work_source_); |
g_source_unref(work_source_); |
+ delete work_source_poll_info_; |
} |
struct ThreadIdTraits { |