Bug 1752305 AsyncShutdown() MediaTrackGrph thread r=padenot
commit382bffd9a0e7457688f5e470ce641dec8b3271c3
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 17 Aug 2022 21:33:16 +0000 (17 21:33 +0000)
committerKarl Tomlinson <karlt+@karlt.net>
Wed, 17 Aug 2022 21:33:16 +0000 (17 21:33 +0000)
treee23af88074bad5c30db6d01b13b1b1723426e277
parent99789192bea4b18c9d2328e7ae1368859da95a12
Bug 1752305 AsyncShutdown() MediaTrackGrph thread r=padenot

This avoids putting a nested event loop on the stack, which may not unwind if
further threads are shutdown, leading to stack exhaustion.

GraphDriver::Shutdown() is called only after control of the graph has been
handed to the main thread so the graph is not running while this is called and
so MediaTrackGraphShutDownRunnable on the main thread should not need to wait
for thread shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D151357
dom/media/GraphDriver.cpp
dom/media/GraphDriver.h
dom/media/MediaTrackGraph.cpp