Bug 1202497 - part 1 - switch nsEventQueue to use a non-reentrant Monitor; r=gerald

nsEventQueue's monitor does not require re-entrancy now that the monitor
is not externally visible.  Since ReentrantMonitors require two separate
mutex lock/unlock pairs (one on entry, and one on exit), this cuts the
amount of locking nsEventQueue's methods do by half.
This commit is contained in:
Nathan Froyd 2015-09-14 21:52:08 -04:00
parent 61f2b07fab
commit e37dae4a02

View File

@ -103,12 +103,12 @@ private:
uint16_t mOffsetTail; // offset into mTail where next item is added
};
class nsEventQueue : protected nsEventQueueBase<mozilla::ReentrantMonitor>
class nsEventQueue : protected nsEventQueueBase<mozilla::Monitor>
{
private:
typedef nsEventQueueBase<mozilla::ReentrantMonitor> Base;
typedef nsEventQueueBase<mozilla::Monitor> Base;
// Can't use typedefs or type alias templates here to name the base type.
friend class nsEventQueueBase<mozilla::ReentrantMonitor>;
friend class nsEventQueueBase<mozilla::Monitor>;
typedef Base::Monitor MonitorType;
typedef Base::MonitorAutoEnterType MonitorAutoEnterType;