зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1048104 - Add GMPMutex::Destroy(). r=jesup
This commit is contained in:
Родитель
89bc78d040
Коммит
2623e1b681
|
@ -203,10 +203,18 @@ GMPThreadImpl::Join()
|
|||
GMPMutexImpl::GMPMutexImpl()
|
||||
: mMutex("gmp-mutex")
|
||||
{
|
||||
MOZ_COUNT_CTOR(GMPMutexImpl);
|
||||
}
|
||||
|
||||
GMPMutexImpl::~GMPMutexImpl()
|
||||
{
|
||||
MOZ_COUNT_DTOR(GMPMutexImpl);
|
||||
}
|
||||
|
||||
void
|
||||
GMPMutexImpl::Destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -41,6 +41,7 @@ public:
|
|||
// GMPMutex
|
||||
virtual void Acquire() MOZ_OVERRIDE;
|
||||
virtual void Release() MOZ_OVERRIDE;
|
||||
virtual void Destroy() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
Mutex mMutex;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
class GMPTask {
|
||||
public:
|
||||
virtual void Destroy() = 0;
|
||||
virtual void Destroy() = 0; // Deletes object.
|
||||
virtual ~GMPTask() {}
|
||||
virtual void Run() = 0;
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ class GMPThread {
|
|||
public:
|
||||
virtual ~GMPThread() {}
|
||||
virtual void Post(GMPTask* aTask) = 0;
|
||||
virtual void Join() = 0; // Deletes GMPThread!
|
||||
virtual void Join() = 0; // Deletes object after join completes.
|
||||
};
|
||||
|
||||
class GMPMutex {
|
||||
|
@ -58,6 +58,7 @@ public:
|
|||
virtual ~GMPMutex() {}
|
||||
virtual void Acquire() = 0;
|
||||
virtual void Release() = 0;
|
||||
virtual void Destroy() = 0; // Deletes object.
|
||||
};
|
||||
|
||||
// Time is defined as the number of milliseconds since the
|
||||
|
|
Загрузка…
Ссылка в новой задаче