diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index a8ce610cc2..e6fbb12fca 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -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 mTimer; nsCOMPtr mScheduleTimer; - nsCOMPtr mTarget; + nsCOMPtr mTarget; CollectorRunnerCallback mCallback; uint32_t mDelay; TimeStamp mDeadline; diff --git a/xpcom/glue/nsCOMPtr.h b/xpcom/glue/nsCOMPtr.h index 7ab6a143c5..fb5af6ddb2 100644 --- a/xpcom/glue/nsCOMPtr.h +++ b/xpcom/glue/nsCOMPtr.h @@ -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 { diff --git a/xpcom/glue/nsThreadUtils.cpp b/xpcom/glue/nsThreadUtils.cpp index 26f8e04fa8..8965952dc3 100644 --- a/xpcom/glue/nsThreadUtils.cpp +++ b/xpcom/glue/nsThreadUtils.cpp @@ -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); diff --git a/xpcom/glue/nsThreadUtils.h b/xpcom/glue/nsThreadUtils.h index 0085e93c5d..01e0f9d2dd 100644 --- a/xpcom/glue/nsThreadUtils.h +++ b/xpcom/glue/nsThreadUtils.h @@ -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); diff --git a/xpcom/threads/nsIIdleRunnable.h b/xpcom/threads/nsIIdleRunnable.h index 4d4b32c8af..fef5da998b 100644 --- a/xpcom/threads/nsIIdleRunnable.h +++ b/xpcom/threads/nsIIdleRunnable.h @@ -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!");