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
3a7f126502
commit
267ba2dd90
@ -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