mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 808229 - remove unused runnable macros r=surkov
This commit is contained in:
parent
788e8fce72
commit
dda18f5df9
@ -66,50 +66,6 @@ protected: \
|
||||
private: \
|
||||
ClassType *mObj; \
|
||||
|
||||
|
||||
#define NS_DECL_RUNNABLEMETHOD(ClassType, Method) \
|
||||
class nsRunnableMethod_##Method : public nsRunnable \
|
||||
{ \
|
||||
public: \
|
||||
nsRunnableMethod_##Method(ClassType *aObj) : mObj(aObj) \
|
||||
{ \
|
||||
NS_IF_ADDREF(mObj); \
|
||||
} \
|
||||
\
|
||||
NS_IMETHODIMP Run() \
|
||||
{ \
|
||||
if (!mObj) \
|
||||
return NS_OK; \
|
||||
(mObj-> Method)(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
\
|
||||
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
|
||||
\
|
||||
};
|
||||
|
||||
#define NS_DECL_RUNNABLEMETHOD_ARG1(ClassType, Method, Arg1Type) \
|
||||
class nsRunnableMethod_##Method : public nsRunnable \
|
||||
{ \
|
||||
public: \
|
||||
nsRunnableMethod_##Method(ClassType *aObj, Arg1Type aArg1) : \
|
||||
mObj(aObj), mArg1(aArg1) \
|
||||
{ \
|
||||
NS_IF_ADDREF(mObj); \
|
||||
} \
|
||||
\
|
||||
NS_IMETHODIMP Run() \
|
||||
{ \
|
||||
if (!mObj) \
|
||||
return NS_OK; \
|
||||
(mObj-> Method)(mArg1); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
\
|
||||
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
|
||||
Arg1Type mArg1; \
|
||||
};
|
||||
|
||||
#define NS_DECL_RUNNABLEMETHOD_ARG2(ClassType, Method, Arg1Type, Arg2Type) \
|
||||
class nsRunnableMethod_##Method : public nsRunnable \
|
||||
{ \
|
||||
@ -134,23 +90,6 @@ public: \
|
||||
Arg1Type mArg1; \
|
||||
Arg2Type mArg2; \
|
||||
};
|
||||
|
||||
#define NS_DISPATCH_RUNNABLEMETHOD(Method, Obj) \
|
||||
{ \
|
||||
nsCOMPtr<nsIRunnable> runnable = \
|
||||
new nsRunnableMethod_##Method(Obj); \
|
||||
if (runnable) \
|
||||
NS_DispatchToMainThread(runnable); \
|
||||
}
|
||||
|
||||
#define NS_DISPATCH_RUNNABLEMETHOD_ARG1(Method, Obj, Arg1) \
|
||||
{ \
|
||||
nsCOMPtr<nsIRunnable> runnable = \
|
||||
new nsRunnableMethod_##Method(Obj, Arg1); \
|
||||
if (runnable) \
|
||||
NS_DispatchToMainThread(runnable); \
|
||||
}
|
||||
|
||||
#define NS_DISPATCH_RUNNABLEMETHOD_ARG2(Method, Obj, Arg1, Arg2) \
|
||||
{ \
|
||||
nsCOMPtr<nsIRunnable> runnable = \
|
||||
|
Loading…
Reference in New Issue
Block a user