Comment 35 for bug 367531

Revision history for this message
In , Adam Dane (unusualtears) wrote :

Created attachment 625811
Avoid deadlocks from events.

This only makes the final pass through the event loop when shutting down.

Calling |Reset| in that locked block has a potential deadlock while running the tests:

> ###!!! ASSERTION: Potential deadlock detected:
> Cyclical dependency starts at
> Mutex : nsAStreamCopier.mLock
> Next dependency:
> Mutex : nsSocketTransportService::mLock (currently acquired)
> Cycle completed at
> Mutex : nsAStreamCopier.mLock
> Deadlock may happen for some other execution

To avoid that possibility, this pulls |Reset| out of the locked block.