Bug 875273 - Re-introduce assertion in RunDBusCallback. r=echou
authorThomas Zimmermann <tdz@users.sourceforge.net>
Tue, 04 Jun 2013 08:07:29 -0400
changeset 133871 1659a732287a2fa35f22d5c15b2191ceb9858373
parent 133870 2fe36f68b55de58f1ae9f2d70584fd710942c60e
child 133872 beca3bdbc0236c955bdd501b70ce129fbeab8856
push id1707
push userryanvm@gmail.com
push dateTue, 04 Jun 2013 19:02:26 +0000
treeherderfx-team@b01fedc71f50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechou
bugs875273, 830290
milestone24.0a1
Bug 875273 - Re-introduce assertion in RunDBusCallback. r=echou With the landing of bug 830290, no DBus callback should ever run in the main thread. This patch therefore re-introduces the corresponding assertion statement.
dom/bluetooth/linux/BluetoothDBusService.cpp
--- a/dom/bluetooth/linux/BluetoothDBusService.cpp
+++ b/dom/bluetooth/linux/BluetoothDBusService.cpp
@@ -898,24 +898,17 @@ void
 RunDBusCallback(DBusMessage* aMsg, void* aBluetoothReplyRunnable,
                 UnpackFunc aFunc)
 {
 #ifdef MOZ_WIDGET_GONK
   // Due to the fact that we're running two dbus loops on desktop implicitly by
   // being gtk based, sometimes we'll get signals/reply coming in on the main
   // thread. There's not a lot we can do about that for the time being and it
   // (technically) shouldn't hurt anything. However, on gonk, die.
-
-  // Due to the fact introducing workaround in Bug 827888, the callback for a
-  // message gets executed immediately. The proper fix is in bug 830290, but
-  // it's a intrusive change, it is better to remove assertion here since it
-  // would not hurt anything.
-  // Tracking bug 830290 for intrusive solution.
-
-  // MOZ_ASSERT(!NS_IsMainThread());
+  MOZ_ASSERT(!NS_IsMainThread());
 #endif
   nsRefPtr<BluetoothReplyRunnable> replyRunnable =
     dont_AddRef(static_cast< BluetoothReplyRunnable* >(aBluetoothReplyRunnable));
 
   NS_ASSERTION(replyRunnable, "Callback reply runnable is null!");
 
   nsAutoString replyError;
   BluetoothValue v;