GraphRunner::mMonitor held across a nested event loop
Categories
(Core :: Audio/Video: MediaStreamGraph, task)
Tracking
()
People
(Reporter: nika, Unassigned)
References
(Depends on 1 open bug)
Details
The GraphRunner::mMonitor
monitor is held across a nested event loop when it is held in GraphRunner::Run
, and events are processed in MediaTrackGraphImpl::OneIterationImpl
. This could potentially lead to a deadlock if a runnable which tries to acquire GraphRunner::mMonitor
is dispatched to that thread.
See bug 1928768, which is adding a runtime check to catch cases like this.
Comment 1•10 months ago
|
||
In this case, there is no other runnable which might try to acquire mMonitor
.
The nsIThread
here has only a single toplevel runnable for the lifetime of the thread. I don't know whether there exists a way to annotate such threads. That runnable controls when other runnables can run. Perhaps the other runnables could be queued on a different event queue to clarify the situation, at the cost of an additional event queue, but I guess that doesn't help indicate that this monitor is isolated from all such runnables.
Bug 1551391 (i.e. bug 1473469 comment 0) will eventually replace this monitor.
Description
•