зеркало из https://github.com/mozilla/gecko-dev.git
Bug 883360 - Remove bool operator and nsMainThreadPtrHolder conversion. r=bsmedberg
This commit is contained in:
Родитель
25c86ec559
Коммит
38d6c0d455
|
@ -370,7 +370,7 @@ public:
|
|||
class OnSocketAcceptedRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnSocketAcceptedRunnable(nsMainThreadPtrHolder<nsIServerSocketListener>* aListener,
|
||||
OnSocketAcceptedRunnable(const nsMainThreadPtrHandle<nsIServerSocketListener>& aListener,
|
||||
nsIServerSocket* aServ,
|
||||
nsISocketTransport* aTransport)
|
||||
: mListener(aListener)
|
||||
|
@ -389,7 +389,7 @@ public:
|
|||
class OnStopListeningRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnStopListeningRunnable(nsMainThreadPtrHolder<nsIServerSocketListener>* aListener,
|
||||
OnStopListeningRunnable(const nsMainThreadPtrHandle<nsIServerSocketListener>& aListener,
|
||||
nsIServerSocket* aServ,
|
||||
nsresult aStatus)
|
||||
: mListener(aListener)
|
||||
|
|
|
@ -523,7 +523,7 @@ public:
|
|||
class OnPacketReceivedRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnPacketReceivedRunnable(nsMainThreadPtrHolder<nsIUDPServerSocketListener>* aListener,
|
||||
OnPacketReceivedRunnable(const nsMainThreadPtrHandle<nsIUDPServerSocketListener>& aListener,
|
||||
nsIUDPServerSocket* aServ,
|
||||
nsIUDPMessage* aMessage)
|
||||
: mListener(aListener)
|
||||
|
@ -542,7 +542,7 @@ public:
|
|||
class OnStopListeningRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnStopListeningRunnable(nsMainThreadPtrHolder<nsIUDPServerSocketListener>* aListener,
|
||||
OnStopListeningRunnable(const nsMainThreadPtrHandle<nsIUDPServerSocketListener>& aListener,
|
||||
nsIUDPServerSocket* aServ,
|
||||
nsresult aStatus)
|
||||
: mListener(aListener)
|
||||
|
|
|
@ -538,7 +538,7 @@ public:
|
|||
class OnLookupCompleteRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnLookupCompleteRunnable(nsMainThreadPtrHolder<nsIDNSListener>* aListener,
|
||||
OnLookupCompleteRunnable(const nsMainThreadPtrHandle<nsIDNSListener>& aListener,
|
||||
nsICancelable* aRequest,
|
||||
nsIDNSRecord* aRecord,
|
||||
nsresult aStatus)
|
||||
|
|
|
@ -171,7 +171,7 @@ public:
|
|||
class LookupCompleteRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
LookupCompleteRunnable(nsMainThreadPtrHolder<nsIUrlClassifierLookupCallback>* aTarget,
|
||||
LookupCompleteRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierLookupCallback>& aTarget,
|
||||
mozilla::safebrowsing::LookupResultArray *aResults)
|
||||
: mTarget(aTarget)
|
||||
, mResults(aResults)
|
||||
|
@ -201,7 +201,7 @@ public:
|
|||
class HandleEventRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
HandleEventRunnable(nsMainThreadPtrHolder<nsIUrlClassifierCallback>* aTarget,
|
||||
HandleEventRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierCallback>& aTarget,
|
||||
const nsACString& aValue)
|
||||
: mTarget(aTarget)
|
||||
, mValue(aValue)
|
||||
|
@ -232,7 +232,7 @@ public:
|
|||
class UpdateUrlRequestedRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
UpdateUrlRequestedRunnable(nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>* aTarget,
|
||||
UpdateUrlRequestedRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierUpdateObserver>& aTarget,
|
||||
const nsACString& aURL,
|
||||
const nsACString& aTable,
|
||||
const nsACString& aServerMAC)
|
||||
|
@ -252,7 +252,7 @@ public:
|
|||
class RekeyRequestedRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
RekeyRequestedRunnable(nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>* aTarget)
|
||||
RekeyRequestedRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierUpdateObserver>& aTarget)
|
||||
: mTarget(aTarget)
|
||||
{ }
|
||||
|
||||
|
@ -265,7 +265,7 @@ public:
|
|||
class StreamFinishedRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
StreamFinishedRunnable(nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>* aTarget,
|
||||
StreamFinishedRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierUpdateObserver>& aTarget,
|
||||
nsresult aStatus, uint32_t aDelay)
|
||||
: mTarget(aTarget)
|
||||
, mStatus(aStatus)
|
||||
|
@ -283,7 +283,7 @@ public:
|
|||
class UpdateErrorRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
UpdateErrorRunnable(nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>* aTarget,
|
||||
UpdateErrorRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierUpdateObserver>& aTarget,
|
||||
nsresult aError)
|
||||
: mTarget(aTarget)
|
||||
, mError(aError)
|
||||
|
@ -299,7 +299,7 @@ public:
|
|||
class UpdateSuccessRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
UpdateSuccessRunnable(nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>* aTarget,
|
||||
UpdateSuccessRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierUpdateObserver>& aTarget,
|
||||
uint32_t aRequestedTimeout)
|
||||
: mTarget(aTarget)
|
||||
, mRequestedTimeout(aRequestedTimeout)
|
||||
|
|
|
@ -180,8 +180,6 @@ class nsMainThreadPtrHandle
|
|||
return *this;
|
||||
}
|
||||
|
||||
operator nsMainThreadPtrHolder<T>*() { return mPtr.get(); }
|
||||
|
||||
// These all call through to nsMainThreadPtrHolder, and thus implicitly
|
||||
// assert that we're on the main thread. Off-main-thread consumers must treat
|
||||
// these handles as opaque.
|
||||
|
@ -203,8 +201,6 @@ class nsMainThreadPtrHandle
|
|||
operator T*() { return get(); }
|
||||
T* operator->() { return get(); }
|
||||
|
||||
operator bool() { return get(); }
|
||||
|
||||
// These are safe to call on other threads with appropriate external locking.
|
||||
bool operator==(const nsMainThreadPtrHandle<T>& aOther) const {
|
||||
if (!mPtr || !aOther.mPtr)
|
||||
|
|
Загрузка…
Ссылка в новой задаче