Bug 843913: Set DBus watch function to null on event loop exit; r=tzimmermann
authorKyle Machulis <kyle@nonpolynomial.com>
Tue, 26 Feb 2013 10:01:48 -0800
changeset 123043 85e419239adb0778263514b2aff5900415a29011
parent 123042 c862b0b9a898fca9549bbd778961ea639dd2f13e
child 123044 b5ec301ad6c04f33cb0b63ddb10b2ce8f1fbc444
push id24372
push useremorley@mozilla.com
push dateWed, 27 Feb 2013 13:22:59 +0000
treeherdermozilla-central@0a91da5f5eab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstzimmermann
bugs843913
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 843913: Set DBus watch function to null on event loop exit; r=tzimmermann
ipc/dbus/DBusThread.cpp
--- a/ipc/dbus/DBusThread.cpp
+++ b/ipc/dbus/DBusThread.cpp
@@ -64,18 +64,16 @@
 #define LOG(args...) if (BTDEBUG) printf(args);
 #endif
 
 #define DEFAULT_INITIAL_POLLFD_COUNT 8
 
 // Functions for converting between unix events in the poll struct,
 // and their dbus definitions
 
-// TODO Add Wakeup to this list once we've moved to ics
-
 enum {
   DBUS_EVENT_LOOP_EXIT = 1,
   DBUS_EVENT_LOOP_ADD = 2,
   DBUS_EVENT_LOOP_REMOVE = 3,
   DBUS_EVENT_LOOP_WAKEUP = 4,
 } DBusEventTypes;
 
 static unsigned int UnixEventsToDBusFlags(short events)
@@ -362,16 +360,18 @@ DBusThread::EventLoop()
                != -1) {
           switch (data) {
           case DBUS_EVENT_LOOP_EXIT:
 #ifdef DEBUG
             LOG("DBus Event Loop Exiting\n");
 #endif
             dbus_connection_set_watch_functions(mConnection,
                                                 NULL, NULL, NULL, NULL, NULL);
+            dbus_connection_set_wakeup_main_function(mConnection, NULL, NULL,
+                                                     NULL);
             return;
           case DBUS_EVENT_LOOP_ADD:
             HandleWatchAdd(this);
             break;
           case DBUS_EVENT_LOOP_REMOVE:
             HandleWatchRemove(this);
             break;
           case DBUS_EVENT_LOOP_WAKEUP: