mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1048102 - Delete GMPThreads as they're joined. r=jesup
This commit is contained in:
parent
f32c7614e8
commit
e6ff1eaf1d
@ -162,10 +162,12 @@ GMPThreadImpl::GMPThreadImpl()
|
||||
: mMutex("GMPThreadImpl"),
|
||||
mThread("GMPThread")
|
||||
{
|
||||
MOZ_COUNT_CTOR(GMPThread);
|
||||
}
|
||||
|
||||
GMPThreadImpl::~GMPThreadImpl()
|
||||
{
|
||||
MOZ_COUNT_DTOR(GMPThread);
|
||||
}
|
||||
|
||||
void
|
||||
@ -189,10 +191,13 @@ GMPThreadImpl::Post(GMPTask* aTask)
|
||||
void
|
||||
GMPThreadImpl::Join()
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
if (mThread.IsRunning()) {
|
||||
mThread.Stop();
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
if (mThread.IsRunning()) {
|
||||
mThread.Stop();
|
||||
}
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
|
||||
GMPMutexImpl::GMPMutexImpl()
|
||||
|
@ -50,7 +50,7 @@ class GMPThread {
|
||||
public:
|
||||
virtual ~GMPThread() {}
|
||||
virtual void Post(GMPTask* aTask) = 0;
|
||||
virtual void Join() = 0;
|
||||
virtual void Join() = 0; // Deletes GMPThread!
|
||||
};
|
||||
|
||||
class GMPMutex {
|
||||
|
Loading…
Reference in New Issue
Block a user