Bug 1114880 follow-up: Rename MOZ_{STRONG,WEAK}_REF to MOZ_{OWNING,NON_OWNING}_REF

--HG--
extra : rebase_source : 51fff0785d112b5b87be3c6ff723c8986b37effe
This commit is contained in:
Ehsan Akhgari 2014-12-23 21:17:50 -05:00
Родитель 883381c0be
Коммит 9297631e0b
17 изменённых файлов: 34 добавлений и 34 удалений

Просмотреть файл

@ -265,7 +265,7 @@ private:
void AssertInvariants() const;
#endif
SharedMemory* MOZ_WEAK_REF mSegment;
SharedMemory* MOZ_NON_OWNING_REF mSegment;
void* mData;
size_t mSize;
id_t mId;

Просмотреть файл

@ -512,11 +512,11 @@
* conversions.
* MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT: Applies to functions. Makes it a compile
* time error to pass arithmetic expressions on variables to the function.
* MOZ_STRONG_REF: Applies to declarations of pointer types. This attribute
* MOZ_OWNING_REF: Applies to declarations of pointer types. This attribute
* tells the compiler that the raw pointer is a strong reference, and that
* property is somehow enforced by the code. This can make the compiler
* ignore these pointers when validating the usage of pointers otherwise.
* MOZ_WEAK_REF: Applies to declarations of pointer types. This attribute
* MOZ_NON_OWNING_REF: Applies to declarations of pointer types. This attribute
* tells the compiler that the raw pointer is a weak reference, and that
* property is somehow enforced by the code. This can make the compiler
* ignore these pointers when validating the usage of pointers otherwise.
@ -535,8 +535,8 @@
# endif
# define MOZ_IMPLICIT __attribute__((annotate("moz_implicit")))
# define MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT __attribute__((annotate("moz_no_arith_expr_in_arg")))
# define MOZ_STRONG_REF __attribute__((annotate("moz_strong_ref")))
# define MOZ_WEAK_REF __attribute__((annotate("moz_weak_ref")))
# define MOZ_OWNING_REF __attribute__((annotate("moz_strong_ref")))
# define MOZ_NON_OWNING_REF __attribute__((annotate("moz_weak_ref")))
/*
* It turns out that clang doesn't like void func() __attribute__ {} without a
* warning, so use pragmas to disable the warning. This code won't work on GCC
@ -556,8 +556,8 @@
# define MOZ_IMPLICIT /* nothing */
# define MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT /* nothing */
# define MOZ_HEAP_ALLOCATOR /* nothing */
# define MOZ_STRONG_REF /* nothing */
# define MOZ_WEAK_REF /* nothing */
# define MOZ_OWNING_REF /* nothing */
# define MOZ_NON_OWNING_REF /* nothing */
#endif /* MOZ_CLANG_PLUGIN */
/*

Просмотреть файл

@ -285,7 +285,7 @@ private:
mPtr = aVal;
}
T* MOZ_STRONG_REF mPtr;
T* MOZ_OWNING_REF mPtr;
static MOZ_ALWAYS_INLINE T* ref(T* aVal)
{
@ -336,7 +336,7 @@ public:
private:
TemporaryRef(T* aVal, const DontRef&) : mPtr(aVal) {}
mutable T* MOZ_STRONG_REF mPtr;
mutable T* MOZ_OWNING_REF mPtr;
TemporaryRef() MOZ_DELETE;
void operator=(const TemporaryRef&) MOZ_DELETE;

Просмотреть файл

@ -123,7 +123,7 @@ private:
void detach() { mPtr = nullptr; }
T* MOZ_WEAK_REF mPtr;
T* MOZ_NON_OWNING_REF mPtr;
};
} // namespace detail

Просмотреть файл

@ -137,7 +137,7 @@ struct already_AddRefed
}
private:
T* MOZ_STRONG_REF mRawPtr;
T* MOZ_OWNING_REF mRawPtr;
};
#endif // AlreadyAddRefed_h

Просмотреть файл

@ -141,7 +141,7 @@ private:
}
}
T* MOZ_STRONG_REF mRawPtr;
T* MOZ_OWNING_REF mRawPtr;
};
namespace StaticPtr_internal {

Просмотреть файл

@ -60,11 +60,11 @@ private:
}
private:
T* MOZ_WEAK_REF mPtr;
T* MOZ_NON_OWNING_REF mPtr;
};
private:
T* MOZ_STRONG_REF mRawPtr;
T* MOZ_OWNING_REF mRawPtr;
public:
typedef T element_type;
@ -431,7 +431,7 @@ private:
}
private:
T* MOZ_STRONG_REF mRawPtr;
T* MOZ_OWNING_REF mRawPtr;
public:
typedef T element_type;
@ -778,7 +778,7 @@ public:
return status;
}
private:
T* MOZ_WEAK_REF mRawPtr;
T* MOZ_NON_OWNING_REF mRawPtr;
};
template<class T>
@ -801,7 +801,7 @@ public:
return status;
}
private:
T* MOZ_WEAK_REF mRawPtr;
T* MOZ_NON_OWNING_REF mRawPtr;
nsresult* mErrorPtr;
};

Просмотреть файл

@ -48,7 +48,7 @@ private:
}
private:
T* MOZ_STRONG_REF mRawPtr;
T* MOZ_OWNING_REF mRawPtr;
public:
typedef T element_type;

Просмотреть файл

@ -31,7 +31,7 @@ struct nsXREAppData
* The directory of the application to be run. May be null if the
* xulrunner and the app are installed into the same directory.
*/
nsIFile* MOZ_WEAK_REF directory;
nsIFile* MOZ_NON_OWNING_REF directory;
/**
* The name of the application vendor. This must be ASCII, and is normally
@ -93,7 +93,7 @@ struct nsXREAppData
* The location of the XRE. XRE_main may not be able to figure this out
* programatically.
*/
nsIFile* MOZ_WEAK_REF xreDirectory;
nsIFile* MOZ_NON_OWNING_REF xreDirectory;
/**
* The minimum/maximum compatible XRE version.

Просмотреть файл

@ -167,7 +167,7 @@ public:
nsresult NS_FASTCALL operator()(const nsIID& aIID, void**) const;
private:
nsISupports* MOZ_STRONG_REF mRawPtr;
nsISupports* MOZ_OWNING_REF mRawPtr;
};
class nsQueryInterfaceWithError
@ -182,7 +182,7 @@ public:
nsresult NS_FASTCALL operator()(const nsIID& aIID, void**) const;
private:
nsISupports* MOZ_STRONG_REF mRawPtr;
nsISupports* MOZ_OWNING_REF mRawPtr;
nsresult* mErrorPtr;
};
@ -319,7 +319,7 @@ public:
begin_assignment();
protected:
NS_MAY_ALIAS_PTR(nsISupports) MOZ_STRONG_REF mRawPtr;
NS_MAY_ALIAS_PTR(nsISupports) MOZ_OWNING_REF mRawPtr;
void assign_assuming_AddRef(nsISupports* aNewPtr)
{
@ -378,7 +378,7 @@ private:
}
private:
T* MOZ_STRONG_REF mRawPtr;
T* MOZ_OWNING_REF mRawPtr;
#endif
public:

Просмотреть файл

@ -41,7 +41,7 @@ public:
private:
const nsCID& mCID;
nsISupports* MOZ_WEAK_REF mOuter;
nsISupports* MOZ_NON_OWNING_REF mOuter;
nsresult* mErrorPtr;
};
@ -60,7 +60,7 @@ public:
private:
const char* mContractID;
nsISupports* MOZ_WEAK_REF mOuter;
nsISupports* MOZ_NON_OWNING_REF mOuter;
nsresult* mErrorPtr;
};
@ -78,8 +78,8 @@ public:
virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const;
private:
nsIFactory* MOZ_WEAK_REF mFactory;
nsISupports* MOZ_WEAK_REF mOuter;
nsIFactory* MOZ_NON_OWNING_REF mFactory;
nsISupports* MOZ_NON_OWNING_REF mOuter;
nsresult* mErrorPtr;
};

Просмотреть файл

@ -385,7 +385,7 @@ public:
enum { ALLOW_MEMMOVE = true };
protected:
T* MOZ_WEAK_REF mKey;
T* MOZ_NON_OWNING_REF mKey;
};
/**

Просмотреть файл

@ -34,7 +34,7 @@ public:
virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const;
private:
nsISupports* MOZ_WEAK_REF mSource;
nsISupports* MOZ_NON_OWNING_REF mSource;
nsresult* mErrorPtr;
};

Просмотреть файл

@ -20,7 +20,7 @@ public:
}
private:
nsISupports* MOZ_STRONG_REF mDoomed;
nsISupports* MOZ_OWNING_REF mDoomed;
};
nsresult

Просмотреть файл

@ -297,7 +297,7 @@ struct nsRunnableMethodReceiver<ClassType, void, Owning>
template<class ClassType>
struct nsRunnableMethodReceiver<ClassType, void, false>
{
ClassType* MOZ_WEAK_REF mObj;
ClassType* MOZ_NON_OWNING_REF mObj;
explicit nsRunnableMethodReceiver(ClassType* aObj) : mObj(aObj) {}
void Revoke() { mObj = nullptr; }
};

Просмотреть файл

@ -45,7 +45,7 @@ private:
mReferent = 0;
}
nsSupportsWeakReference* MOZ_WEAK_REF mReferent;
nsSupportsWeakReference* MOZ_NON_OWNING_REF mReferent;
};
nsresult

Просмотреть файл

@ -31,7 +31,7 @@ private:
// Called (only) by an |nsWeakReference| from _its_ dtor.
void NoticeProxyDestruction() { mProxy = 0; }
nsWeakReference* MOZ_WEAK_REF mProxy;
nsWeakReference* MOZ_NON_OWNING_REF mProxy;
protected: