Bug 1349379 - Deprecate already_AddRefed only with RefPtr, not with nsCOMPtr. - r=dbaron
MozReview-Commit-ID: 6nC7f7LSWTF
--- a/mfbt/AlreadyAddRefed.h
+++ b/mfbt/AlreadyAddRefed.h
@@ -23,19 +23,20 @@ struct unused_t;
* already_AddRefed cooperates with reference counting smart pointers to enable
* you to assign in a pointer _without_ |AddRef|ing it. You might want to use
* this as a return type from a function that returns an already |AddRef|ed
* pointer.
*
* TODO Move already_AddRefed to namespace mozilla. This has not yet been done
* because of the sheer number of usages of already_AddRefed.
*
- * @deprecated This class is unnecessary now that RefPtr supports move
- * construction. New code should return a RefPtr instead of an
- * already_AddRefed.
+ * @deprecated This class deprecated for use with RefPtr, now that RefPtr
+ * supports move construction. New code should return a RefPtr
+ * instead of an already_AddRefed.
+ * Use with nsCOMPtr is *not* deprecated, and is still required.
*/
template<class T>
struct MOZ_MUST_USE_TYPE MOZ_NON_AUTOABLE already_AddRefed
{
/*
* We want to allow returning nullptr from functions returning
* already_AddRefed<T>, for simplicity. But we also don't want to allow
* returning raw T*, instead preferring creation of already_AddRefed<T> from