Gecko compiled in debug mode during startup on device: I/Gecko ( 2204): ###!!! ASSERTION: SwitchSensor not thread-safe: '_mOwningThread.GetThread() == PR_GetCurrentThread()', file /Volumes/mac/moz/b2ggecko/hal/gonk/GonkSensor.cpp, line 204
This is not really that bad as it looks. The use of NS_INLINE_DECL_REFCOUNTING() macro asserts it's in the same thread as when the object is created when refcounting. For objects to be passed as to another thread for execution using NS_NewRunnableMethod() this assertion will be triggered, though there actually is no underlying threading problems.
Created attachment 626736 [details] [diff] [review] Don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads.
Created attachment 626741 [details] [diff] [review] Don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads. Deprecate previous version, which Eclipse filled in wrong user.