Trying adjust some functions. nsIEventTarget does not exists until later due xpcom changes that are not ported.

Trying adjust some functions. nsIEventTarget does not exists until later due xpcom changes that are not ported.
This commit is contained in:
win7-7 2024-05-19 01:02:57 +03:00 committed by wuggy
commit fdba987b79
5 changed files with 7 additions and 13 deletions

View file

@ -282,7 +282,7 @@ public:
mDeadline = aDeadline;
};
void SetTimer(uint32_t aDelay, nsIEventTarget* aTarget) override
void SetTimer(uint32_t aDelay, nsIThread* aTarget) override
{
if (mTimerActive) {
return;
@ -391,7 +391,7 @@ private:
nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<nsITimer> mScheduleTimer;
nsCOMPtr<nsIEventTarget> mTarget;
nsCOMPtr<nsIThread> mTarget;
CollectorRunnerCallback mCallback;
uint32_t mDelay;
TimeStamp mDeadline;

View file

@ -746,13 +746,8 @@ public:
//
// Prefer the implicit use of this operator to calling |get()|, except where
// necessary to resolve ambiguity.
operator T*() const
#ifdef MOZ_HAVE_REF_QUALIFIERS
&
#endif
{ return get(); }
operator T*() const & { return get(); }
#ifdef MOZ_HAVE_REF_QUALIFIERS
// Don't allow implicit conversion of temporary nsCOMPtr to raw pointer,
// because the refcount might be one and the pointer will immediately become
// invalid.
@ -760,7 +755,6 @@ public:
// Needed to avoid the deleted operator above
explicit operator bool() const { return !!mRawPtr; }
#endif
T* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN
{

View file

@ -304,7 +304,7 @@ public:
runnable->Run();
}
void SetTimer(uint32_t aDelay, nsIEventTarget* aTarget)
void SetTimer(uint32_t aDelay, nsIThread* aTarget)
{
MOZ_ASSERT(aTarget);
MOZ_ASSERT(!mTimer);

View file

@ -1167,7 +1167,7 @@ public:
mReceiver.SetDeadline(aDeadline);
}
void SetTimer(uint32_t aDelay, nsIEventTarget* aTarget)
void SetTimer(uint32_t aDelay, nsIThread* aTarget)
{
MOZ_ASSERT(aTarget);

View file

@ -13,7 +13,7 @@
{ 0x688be92e, 0x7ade, 0x4fdc, \
{ 0x9d, 0x83, 0x74, 0xcb, 0xef, 0xf4, 0xa5, 0x2c } }
class nsIEventTarget;
class nsIThread;
/**
@ -30,7 +30,7 @@ public:
* should stop executing.
*/
virtual void SetDeadline(mozilla::TimeStamp aDeadline) {};
virtual void SetTimer(uint32_t aDelay, nsIEventTarget* aTarget)
virtual void SetTimer(uint32_t aDelay, nsIThread* aTarget)
{
NS_NOTREACHED("The nsIIdleRunnable instance does not support "
"idle dispatch with timeout!");