mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 884061 - Part 3m: Use NS_DECL_THREADSAFE_ISUPPORTS in ipc/, r=bent
--HG-- extra : rebase_source : 77f707d086624cc908a4e39935aa2a03f16543fb
This commit is contained in:
parent
697b803613
commit
48de6321af
@ -36,7 +36,7 @@ CloseFileRunnable::~CloseFileRunnable()
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(CloseFileRunnable, nsIRunnable)
|
||||
NS_IMPL_ISUPPORTS1(CloseFileRunnable, nsIRunnable)
|
||||
|
||||
void
|
||||
CloseFileRunnable::Dispatch()
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
{ }
|
||||
#endif
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIRUNNABLE
|
||||
|
||||
void Dispatch();
|
||||
|
@ -23,7 +23,7 @@ using mozilla::ipc::MessagePump;
|
||||
using mozilla::ipc::MessagePumpForChildProcess;
|
||||
using base::TimeTicks;
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(DoWorkRunnable, nsIRunnable, nsITimerCallback)
|
||||
NS_IMPL_ISUPPORTS2(DoWorkRunnable, nsIRunnable, nsITimerCallback)
|
||||
|
||||
NS_IMETHODIMP
|
||||
DoWorkRunnable::Run()
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
DoWorkRunnable(MessagePump* aPump)
|
||||
: mPump(aPump) { }
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIRUNNABLE
|
||||
NS_DECL_NSITIMERCALLBACK
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
|
||||
#include "nsAtomicRefcnt.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
|
||||
#include "mozilla/ipc/SyncChannel.h"
|
||||
#include "nsAutoPtr.h"
|
||||
@ -392,22 +392,15 @@ private:
|
||||
{
|
||||
public:
|
||||
RefCountedTask(CancelableTask* aTask)
|
||||
: mTask(aTask)
|
||||
, mRefCnt(0) {}
|
||||
: mTask(aTask) {}
|
||||
~RefCountedTask() { delete mTask; }
|
||||
void Run() { mTask->Run(); }
|
||||
void Cancel() { mTask->Cancel(); }
|
||||
void AddRef() {
|
||||
NS_AtomicIncrementRefcnt(mRefCnt);
|
||||
}
|
||||
void Release() {
|
||||
if (NS_AtomicDecrementRefcnt(mRefCnt) == 0)
|
||||
delete this;
|
||||
}
|
||||
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RefCountedTask)
|
||||
|
||||
private:
|
||||
CancelableTask* mTask;
|
||||
nsrefcnt mRefCnt;
|
||||
};
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user